summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/import-in-lazy-function.js
blob: cddacb1428a4bdc65a375b2db4b24bd60fe6f891 (plain)
1
2
3
4
5
6
7
8
9
10
11
// |jit-test| module

// Test that accessing imports in lazily parsed functions works.

import { a } from "module1.js";

function add1(x) {
    return x + a;
}

assertEq(add1(2), 3);