summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Comprehensions/syntax.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/ecma_6/Comprehensions/syntax.js')
-rw-r--r--js/src/tests/ecma_6/Comprehensions/syntax.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Comprehensions/syntax.js b/js/src/tests/ecma_6/Comprehensions/syntax.js
new file mode 100644
index 000000000..a57b1e6dd
--- /dev/null
+++ b/js/src/tests/ecma_6/Comprehensions/syntax.js
@@ -0,0 +1,6 @@
+// "let" is not allowed as an identifier.
+
+assertThrowsInstanceOf(function () { eval('[for (let of y) foo]') }, SyntaxError);
+assertThrowsInstanceOf(function () { eval('(for (let of y) foo)') }, SyntaxError);
+
+reportCompare(null, null, "test");