bigint-pow-negative-exponent.js (321B)
1 // Fallible BigInt exponentiation should bail out when the power is negative. 2 function resumeAfterException(t) { 3 for (var i = 0; i < 2; i++) { 4 try { 5 var x = 1; 6 1n ** 1n; 7 x = 2; 8 1n ** t; 9 } catch (e) { 10 assertEq(x, 2); 11 } 12 } 13 } 14 resumeAfterException(1n); 15 resumeAfterException(-1n);