Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index cdec0a0aa1cf6beeb9280d5701112b2ca2cf7d0b..0faaf54ed8c4c1f95c85374aec840a85d51f1f77 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -9080,6 +9080,13 @@ TEST(PreParserScopeAnalysis) { |
{"", "var var1; var var1; function f() { var1; }"}, |
{"", "var var1; var var1; function f() { var1 = 5; }"}, |
+ {"", "var var1; if (true) { var var1; }"}, |
+ {"", "var var1; if (true) { let var1; }"}, |
+ {"", "let var1; if (true) { let var1; }"}, |
+ |
+ {"", "var var1; if (true) { const var1 = 0; }"}, |
+ {"", "const var1 = 0; if (true) { const var1 = 0; }"}, |
+ |
{"", "arguments;"}, |
{"", "arguments = 5;"}, |
{"", "function f() { arguments; }"}, |
@@ -9134,6 +9141,27 @@ TEST(PreParserScopeAnalysis) { |
{"", |
"const {var1: var2, var3: {var4: var5}} = {var1: 1, var3: {var4: 2}};"}, |
{"", "const {var1: var2, var3: [var4, var5]} = {var1: 1, var3: [2, 3]};"}, |
+ |
+ {"", "inner;"}, |
+ {"", "function f1() { f1; }"}, |
+ {"", "function f1() { inner; }"}, |
+ {"", "function f1() { function f2() { f1; } }"}, |
+ {"", "function arguments() {}"}, |
+ {"", "function f1() {} function f1() {}"}, |
+ {"", "var f1; function f1() {}"}, |
+ |
+ {"", "inner = 3;"}, |
+ {"", "function f1() { f1 = 3; }"}, |
+ {"", "function f1() { f1; } f1 = 3;"}, |
+ {"", "function arguments() {} arguments = 8"}, |
+ {"", "function f1() {} f1 = 3; function f1() {}"}, |
+ |
+ {"", "var var1; eval('');"}, |
+ {"", "var var1; function f1() { eval(''); }"}, |
+ {"", "let var1; eval('');"}, |
+ {"", "let var1; function f1() { eval(''); }"}, |
+ {"", "const var1 = 10; eval('');"}, |
+ {"", "const var1 = 10; function f1() { eval(''); }"}, |
}; |
for (unsigned i = 0; i < arraysize(inners); ++i) { |