Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index 2b8e0fb3a6c8869409a51280d1395b15065ee832..217fe0b1cdc40defff329c31007c7d62ac8762c2 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -6342,6 +6342,7 @@ TEST(DestructuringPositiveTests) { |
"[...rest]", |
"[a,b,...rest]", |
"[a,,...rest]", |
+ "{ __proto__: x, __proto__: y}", |
"{arguments: x}", |
"{eval: x}", |
NULL}; |
@@ -6629,6 +6630,7 @@ TEST(DestructuringAssignmentPositiveTests) { |
"{ x : [ foo()[y] = 10 ] = {} }", |
"{ x : [ y.z = 10 ] = {} }", |
"{ x : [ y[z] = 10 ] = {} }", |
+ "{ z : { __proto__: x, __proto__: y } = z }" |
"[ x ]", |
"[ foo().x ]", |
@@ -6748,6 +6750,8 @@ TEST(DestructuringAssignmentPositiveTests) { |
"var x; (true ? { x = true } = {} : { x = false } = {})", |
"var q, x; (q, { x = 10 } = {});", |
"var { x = 10 } = { x = 20 } = {};", |
+ "var { __proto__: x, __proto__: y } = {}", |
+ "({ __proto__: x, __proto__: y } = {})", |
"var { x = 10 } = (o = { x = 20 } = {});", |
"var x; (({ x = 10 } = { x = 20 } = {}) => x)({})", |
NULL, |
@@ -6783,6 +6787,8 @@ TEST(DestructuringAssignmentNegativeTests) { |
"{ new.target }", |
"{ x: new.target }", |
"{ x: new.target = 1 }", |
+ "{{ __proto__: x, __proto__: y}}", |
adamk
2016/08/19 23:27:35
Why the double braces? Isn't that already an error
|
+ "({ __proto__: x, __proto__: y})", |
adamk
2016/08/19 23:27:35
Same here, I think the parens are already an error
|
"[x--]", |
"[--x = 1]", |
"[x()]", |
@@ -6870,6 +6876,8 @@ TEST(DestructuringAssignmentNegativeTests) { |
"var { x = 10 } = { x = 20 };", |
"var { x = 10 } = (o = { x = 20 });", |
"var x; (({ x = 10 } = { x = 20 }) => x)({})", |
+ "var {{ __proto__: x, __proto__: y}}", |
adamk
2016/08/19 23:27:35
And here and below.
|
+ "({ __proto__: x, __proto__: y}) => ()", |
// Not ambiguous, but uses same context data |
"switch([window %= []] = []) { default: }", |