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

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

Issue 2656753003: [ast/parsing] Pessimistically assume all top-level variables will be assigned. (Closed)
Patch Set: Rebase. 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/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 37b40e37ae3bb204d045b4531ff948c901cee7ad..0d53abd44c834f39a13576f924bd743d3965e99f 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)",
« no previous file with comments | « src/parsing/pattern-rewriter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698