summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/namespace-import-compilation.js
blob: 42595b709572d5b1c393f528950d4567f196c938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// |jit-test| module

import * as ns from 'module1.js';

let other = ns;

const iterations = 10000;

let x = 0;
for (let i = 0; i < iterations; i++) {
    if (i == iterations / 2)
        other = { a: 0 };
    x += other.a;
}

assertEq(other.a, 0);
assertEq(x, iterations / 2);