mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 19:53:50 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			402 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			402 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| //@ runBigIntEnabled
 | |
| 
 | |
| function assert(v, e) {
 | |
|     if (v !== e)
 | |
|         throw new Error("Expected value: " + e + " but got: " + v)
 | |
| }
 | |
| 
 | |
| function bigIntPropagation(a, b) {
 | |
|     let c = a + b;
 | |
|     return c + 0n;
 | |
| }
 | |
| noInline(bigIntPropagation);
 | |
| 
 | |
| for (let i = 0; i < 100000; i++) {
 | |
|     let out = bigIntPropagation(0xffffffffffffffffffffffffffffffn, 0x1n);
 | |
|     assert(out, 0x1000000000000000000000000000000n)
 | |
| }
 | |
| 
 |