Bug 1222446 - Test that assiging to or deleting module imports is an error r=shu
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 10 Nov 2015 09:44:53 +0000
changeset 308030 be11a4215c0beca9e230f039ac29a05d0397b34b
parent 308029 8ff488cc4d44be89c932cc9534fd6f7d3705b275
child 308031 d92cfc42f1140832c3fa0dd248484bb5573debb7
push id7422
push userpehrsons@gmail.com
push dateWed, 11 Nov 2015 04:19:53 +0000
reviewersshu
bugs1222446
milestone45.0a1
Bug 1222446 - Test that assiging to or deleting module imports is an error r=shu
js/src/jit-test/tests/modules/add-to-namespace-import.js
js/src/jit-test/tests/modules/assign-to-import.js
js/src/jit-test/tests/modules/assign-to-namespace-import.js
js/src/jit-test/tests/modules/assign-to-namespace.js
js/src/jit-test/tests/modules/delete-import.js
js/src/jit-test/tests/modules/delete-namespace-import.js
js/src/jit-test/tests/modules/delete-namespace.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/modules/add-to-namespace-import.js
@@ -0,0 +1,3 @@
+// |jit-test| module; error: TypeError
+import * as ns from "module1.js";
+ns.b = 2;
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/modules/assign-to-import.js
@@ -0,0 +1,3 @@
+// |jit-test| module; error: TypeError
+import { a } from "module1.js";
+a = 2;
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/modules/assign-to-namespace-import.js
@@ -0,0 +1,3 @@
+// |jit-test| module; error: TypeError
+import * as ns from "module1.js";
+ns.a = 2;
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/modules/assign-to-namespace.js
@@ -0,0 +1,3 @@
+// |jit-test| module; error: TypeError
+import * as ns from "module1.js";
+ns = 2;
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/modules/delete-import.js
@@ -0,0 +1,3 @@
+// |jit-test| module; error: SyntaxError
+import { a } from "module1.js";
+delete a;
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/modules/delete-namespace-import.js
@@ -0,0 +1,3 @@
+// |jit-test| module; error: TypeError
+import * as ns from "module1.js";
+delete ns.a;
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/modules/delete-namespace.js
@@ -0,0 +1,3 @@
+// |jit-test| module; error: SyntaxError
+import * as ns from "module1.js";
+delete ns;