aboutsummaryrefslogtreecommitdiff
path: root/test/input
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-09 21:42:27 +0000
committerGitHub <noreply@github.com>2021-02-10 05:42:27 +0800
commit228cdf8e7e1dc472813f7def780b8608a4f5f485 (patch)
treed8836d3831f5d6f465b79d5f7d295d19a7295d76 /test/input
parent14fedbf123a5d8a86621ac6aa996042ee0011b47 (diff)
downloadtracifyjs-228cdf8e7e1dc472813f7def780b8608a4f5f485.tar.gz
tracifyjs-228cdf8e7e1dc472813f7def780b8608a4f5f485.zip
reject invalid `for...of` syntax (#4632)
Diffstat (limited to 'test/input')
-rw-r--r--test/input/invalid/for-of_1.js3
-rw-r--r--test/input/invalid/for-of_2.js3
2 files changed, 6 insertions, 0 deletions
diff --git a/test/input/invalid/for-of_1.js b/test/input/invalid/for-of_1.js
new file mode 100644
index 00000000..7d4ffe25
--- /dev/null
+++ b/test/input/invalid/for-of_1.js
@@ -0,0 +1,3 @@
+var a = [ 1 ], b;
+for (b = 2 of a)
+ console.log(b);
diff --git a/test/input/invalid/for-of_2.js b/test/input/invalid/for-of_2.js
new file mode 100644
index 00000000..52972b80
--- /dev/null
+++ b/test/input/invalid/for-of_2.js
@@ -0,0 +1,3 @@
+var a = [ 1 ];
+for (var b = 2 of a)
+ console.log(b);