Bug 1222446 - Add test for cyclic module imports r=shu
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 10 Nov 2015 09:44:53 +0000
changeset 308032 012f6c8917e5639cbecf94709b3f9c2ba6b5aaa6
parent 308031 d92cfc42f1140832c3fa0dd248484bb5573debb7
child 308033 c2d4568291c02de3e79862a16d4118a9974de1fc
push id7422
push userpehrsons@gmail.com
push dateWed, 11 Nov 2015 04:19:53 +0000
reviewersshu
bugs1222446
milestone45.0a1
Bug 1222446 - Add test for cyclic module imports r=shu
js/src/jit-test/modules/cyclicImport1.js
js/src/jit-test/modules/cyclicImport2.js
js/src/jit-test/tests/modules/cyclic-import.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/modules/cyclicImport1.js
@@ -0,0 +1,4 @@
+import { b } from "cyclicImport2.js";
+
+export let a = 1;
+assertEq(b, 2);
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/modules/cyclicImport2.js
@@ -0,0 +1,4 @@
+import { a } from "cyclicImport1.js";
+
+export let b = 2;
+assertEq(a, 1);
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/modules/cyclic-import.js
@@ -0,0 +1,3 @@
+// |jit-test| module; error: ReferenceError
+
+import { a } from "cyclicImport1.js";