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

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

Issue 1583863003: [parser] reject AssignmentElements with non-ASSIGN initializer ops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/parser-base.h ('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 2c22399c349da2d70d308fe7466d6056509b3e6b..7269e2d5b239ab25ff0765250912735e04b47429 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -7096,6 +7096,9 @@ TEST(DestructuringAssignmentNegativeTests) {
"[ (++y) ]",
"[ ...(++y) ]",
+ "[ x += x ]",
+ "{ foo: x += x }",
+
NULL};
// clang-format on
static const ParserFlag always_flags[] = {
@@ -7121,6 +7124,10 @@ TEST(DestructuringAssignmentNegativeTests) {
"var { x = 10 } = { x = 20 };",
"var { x = 10 } = (o = { x = 20 });",
"var x; (({ x = 10 } = { x = 20 }) => x)({})",
+
+ // Not ambiguous, but uses same context data
+ "switch([window %= []] = []) { default: }",
+
NULL,
};
RunParserSyncTest(empty_context_data, ambiguity_data, kError, NULL, 0,
« no previous file with comments | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698