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

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

Issue 2656753003: [ast/parsing] Pessimistically assume all top-level variables will be assigned. (Closed)
Patch Set: 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
« src/parsing/pattern-rewriter.cc ('K') | « src/parsing/pattern-rewriter.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 73adbfe6d6e6073b41b76960a9cd2d917022d0fe..325cdd49ef15250a9da7cab1ddee406eeb9328a1 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -3525,7 +3525,10 @@ TEST(MaybeAssignedTopLevel) {
const char* prefixes[] = {
"let foo; ", "let foo = 0; ",
"let [foo] = [1]; ", "let {foo} = {foo: 2}; ",
- "let {foo=3} = {}; ",
+ "let {foo=3} = {}; ", "function foo() {}; ",
+ "var foo; ", "var foo = 0; ",
+ "var [foo] = [1]; ", "var {foo} = {foo: 2}; ",
+ "var {foo=3} = {}; ", "function* foo() {}; ",
};
const char* sources[] = {
"function bar() {foo = 42}; ext(bar); ext(foo)",
« src/parsing/pattern-rewriter.cc ('K') | « src/parsing/pattern-rewriter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698