Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1531)

Unified Diff: test/cctest/test-parsing.cc

Issue 2658063005: [parser] Skipping inner funcs: produce correct data for var redeclarations. (Closed)
Patch Set: moar Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/scopes.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 784212c08cb9d07225aa45a21162e00c8ab02273..0229bb73db715884ce6cf9a22eea6f3c26591ce5 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -9066,6 +9066,15 @@ TEST(PreParserScopeAnalysis) {
{"", "const var1 = 5;"},
{"", "if (true) { const var1 = 5; }"},
{"", "const var1 = 5; function f() { var1; }"},
+
+ {"", "var var1; var var1;"},
+ {"", "var var1; var var1; var1 = 5;"},
+ {"", "var var1; if (true) { var var1; }"},
+ {"", "if (true) { var var1; var var1; }"},
+ {"", "var var1; if (true) { var var1; var1 = 5; }"},
+ {"", "if (true) { var var1; var var1; var1 = 5; }"},
+ {"", "var var1; var var1; function f() { var1; }"},
+ {"", "var var1; var var1; function f() { var1 = 5; }"},
};
for (unsigned i = 0; i < arraysize(inners); ++i) {
« no previous file with comments | « src/ast/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698