diff options
Diffstat (limited to 'js/src/jit-test/tests/modules/namespace-import-compilation-2.js')
-rw-r--r-- | js/src/jit-test/tests/modules/namespace-import-compilation-2.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/modules/namespace-import-compilation-2.js b/js/src/jit-test/tests/modules/namespace-import-compilation-2.js new file mode 100644 index 000000000..ae322246d --- /dev/null +++ b/js/src/jit-test/tests/modules/namespace-import-compilation-2.js @@ -0,0 +1,17 @@ +// |jit-test| module + +import * as ns from 'module1.js'; + +let other = ns; + +const iterations = 2000; + +let x = 0; +for (let i = 0; i < iterations; i++) { + if (i == iterations / 2) + other = 1; + x += other.a; +} + +assertEq(other.a, undefined); +assertEq(x, NaN); |