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, |