Modified: branches/safari-604.1.38.0-branch/LayoutTests/js/parser-syntax-check-expected.txt (220989 => 220990)
--- branches/safari-604.1.38.0-branch/LayoutTests/js/parser-syntax-check-expected.txt 2017-08-21 23:31:04 UTC (rev 220989)
+++ branches/safari-604.1.38.0-branch/LayoutTests/js/parser-syntax-check-expected.txt 2017-08-21 23:31:44 UTC (rev 220990)
@@ -1215,68 +1215,68 @@
PASS Valid: "function f() { var {x: [y, {z: {z: [...z]}}]} = 20 }"
PASS Invalid: "var [...y, ...z] = 20". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected a closing ']' following a rest element destructuring pattern."
PASS Invalid: "function f() { var [...y, ...z] = 20 }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected a closing ']' following a rest element destructuring pattern."
-PASS Valid: "var [...{...y}] = 20" with TypeError
-PASS Valid: "function f() { var [...{...y}] = 20 }"
-PASS Valid: "var {a, b, ...r} = {a: 1, b: 2, c: 3};"
-PASS Valid: "function f() { var {a, b, ...r} = {a: 1, b: 2, c: 3}; }"
-PASS Invalid: "var {a, b, ...{d}} = {a: 1, b: 2, c: 3, d: 4};". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected a binding element."
-PASS Invalid: "function f() { var {a, b, ...{d}} = {a: 1, b: 2, c: 3, d: 4}; }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected a binding element."
-PASS Invalid: "var {a, b, ...{d = 15}} = {a: 1, b: 2, c: 3, d: 4};". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected a binding element."
-PASS Invalid: "function f() { var {a, b, ...{d = 15}} = {a: 1, b: 2, c: 3, d: 4}; }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected a binding element."
-PASS Invalid: "var {a, b, ...{d = 15, ...r}} = {a: 1, b: 2, c: 3, d: 4};". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected a binding element."
-PASS Invalid: "function f() { var {a, b, ...{d = 15, ...r}} = {a: 1, b: 2, c: 3, d: 4}; }". Produced the following syntax error: "SyntaxError: Unexpected token '{'. Expected a binding element."
-PASS Valid: "(({a, b, ...r}) => {})({a: 1, b: 2, c: 3, d: 4});"
-PASS Valid: "function f() { (({a, b, ...r}) => {})({a: 1, b: 2, c: 3, d: 4}); }"
-PASS Valid: "(function ({a, b, ...r}) {})({a: 1, b: 2, c: 3, d: 4});"
-PASS Valid: "function f() { (function ({a, b, ...r}) {})({a: 1, b: 2, c: 3, d: 4}); }"
-PASS Valid: "var a, b, c; ({a, b, ...r} = {a: 1, b: 2, c: 3, d: 4});"
-PASS Valid: "function f() { var a, b, c; ({a, b, ...r} = {a: 1, b: 2, c: 3, d: 4}); }"
-PASS Valid: "try { throw {a:2} } catch({...rest}) {}"
-PASS Valid: "function f() { try { throw {a:2} } catch({...rest}) {} }"
-PASS Valid: "let c = {}; let o = {a: 1, b: 2, ...c};"
-PASS Valid: "function f() { let c = {}; let o = {a: 1, b: 2, ...c}; }"
-PASS Valid: "let o = {a: 1, b: 3, ...{}};"
-PASS Valid: "function f() { let o = {a: 1, b: 3, ...{}}; }"
-PASS Valid: "let o = {a: 1, b: 2, ...null, c: 3};"
-PASS Valid: "function f() { let o = {a: 1, b: 2, ...null, c: 3}; }"
-PASS Valid: "let o = {a: 1, b: 2, ...undefined, c: 3};"
-PASS Valid: "function f() { let o = {a: 1, b: 2, ...undefined, c: 3}; }"
-PASS Valid: "let o = {a: 1, b: 2, ...{...{}}, c: 3};"
-PASS Valid: "function f() { let o = {a: 1, b: 2, ...{...{}}, c: 3}; }"
-PASS Valid: "let c = {}; let o = {a: 1, b: 2, ...c, d: 3, ...c, e: 5};"
-PASS Valid: "function f() { let c = {}; let o = {a: 1, b: 2, ...c, d: 3, ...c, e: 5}; }"
-PASS Valid: "let o = {a: 1, b: 2, ...d = {e: 2}, c: 3};"
-PASS Valid: "function f() { let o = {a: 1, b: 2, ...d = {e: 2}, c: 3}; }"
-PASS Valid: "let p = true; let o = {a: 1, b: 2, ...d = p ? {e: 2} : {f: 4}, c: 3};"
-PASS Valid: "function f() { let p = true; let o = {a: 1, b: 2, ...d = p ? {e: 2} : {f: 4}, c: 3}; }"
-PASS Valid: "let o = {a: 1, b: 2, ...(a) => 3, c: 3};"
-PASS Valid: "function f() { let o = {a: 1, b: 2, ...(a) => 3, c: 3}; }"
-PASS Valid: "function * foo() { return {a: 1, b: 2, ...yield, c: 3}; }"
-PASS Valid: "function f() { function * foo() { return {a: 1, b: 2, ...yield, c: 3}; } }"
-PASS Invalid: "function * foo(o) { ({...{ x = yield }} = o); }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a ':' following the property name 'x'."
-PASS Invalid: "function f() { function * foo(o) { ({...{ x = yield }} = o); } }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a ':' following the property name 'x'."
-PASS Invalid: "var {...r = {a: 2}} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a closing '}' following a rest element destructuring pattern."
-PASS Invalid: "function f() { var {...r = {a: 2}} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected token '='. Expected a closing '}' following a rest element destructuring pattern."
-PASS Invalid: "var {...r, b} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected a closing '}' following a rest element destructuring pattern."
-PASS Invalid: "function f() { var {...r, b} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected a closing '}' following a rest element destructuring pattern."
-PASS Invalid: "var {...r, ...e} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected a closing '}' following a rest element destructuring pattern."
-PASS Invalid: "function f() { var {...r, ...e} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected token ','. Expected a closing '}' following a rest element destructuring pattern."
-PASS Invalid: "({...new Object()} = {a: 1, b: 2});". Produced the following syntax error: "SyntaxError: Invalid destructuring assignment target."
-PASS Invalid: "function f() { ({...new Object()} = {a: 1, b: 2}); }". Produced the following syntax error: "SyntaxError: Invalid destructuring assignment target."
-PASS Invalid: "(function * (o) { ({ ...{ x: yield } } = o); })()". Produced the following syntax error: "SyntaxError: Invalid destructuring assignment target."
-PASS Invalid: "function f() { (function * (o) { ({ ...{ x: yield } } = o); })() }". Produced the following syntax error: "SyntaxError: Invalid destructuring assignment target."
-PASS Invalid: "(function () {'use strict'; ({...eval} = {}); })()". Produced the following syntax error: "SyntaxError: Cannot modify 'eval' in strict mode."
-PASS Invalid: "function f() { (function () {'use strict'; ({...eval} = {}); })() }". Produced the following syntax error: "SyntaxError: Cannot modify 'eval' in strict mode."
-PASS Invalid: "(function () {'use strict'; ({...arguments} = {}); })()". Produced the following syntax error: "SyntaxError: Cannot modify 'arguments' in strict mode."
-PASS Invalid: "function f() { (function () {'use strict'; ({...arguments} = {}); })() }". Produced the following syntax error: "SyntaxError: Cannot modify 'arguments' in strict mode."
-PASS Invalid: "async function foo () { let {...await} = {}; }". Produced the following syntax error: "SyntaxError: Cannot use 'await' as a lexical variable name in an async function."
-PASS Invalid: "function f() { async function foo () { let {...await} = {}; } }". Produced the following syntax error: "SyntaxError: Cannot use 'await' as a lexical variable name in an async function."
-PASS Invalid: "let {...let} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Cannot use 'let' as an identifier name for a LexicalDeclaration."
-PASS Invalid: "function f() { let {...let} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Cannot use 'let' as an identifier name for a LexicalDeclaration."
-PASS Invalid: "const {...let} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Cannot use 'let' as an identifier name for a LexicalDeclaration."
-PASS Invalid: "function f() { const {...let} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'let'. Cannot use 'let' as an identifier name for a LexicalDeclaration."
-PASS Invalid: "try { throw {a:2} } catch({...foo.a}) {}". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected a closing '}' following a rest element destructuring pattern."
-PASS Invalid: "function f() { try { throw {a:2} } catch({...foo.a}) {} }". Produced the following syntax error: "SyntaxError: Unexpected token '.'. Expected a closing '}' following a rest element destructuring pattern."
+PASS Invalid: "var [...{...y}] = 20". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var [...{...y}] = 20 }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "var {a, b, ...r} = {a: 1, b: 2, c: 3};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var {a, b, ...r} = {a: 1, b: 2, c: 3}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "var {a, b, ...{d}} = {a: 1, b: 2, c: 3, d: 4};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var {a, b, ...{d}} = {a: 1, b: 2, c: 3, d: 4}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "var {a, b, ...{d = 15}} = {a: 1, b: 2, c: 3, d: 4};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var {a, b, ...{d = 15}} = {a: 1, b: 2, c: 3, d: 4}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "var {a, b, ...{d = 15, ...r}} = {a: 1, b: 2, c: 3, d: 4};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var {a, b, ...{d = 15, ...r}} = {a: 1, b: 2, c: 3, d: 4}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "(({a, b, ...r}) => {})({a: 1, b: 2, c: 3, d: 4});". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { (({a, b, ...r}) => {})({a: 1, b: 2, c: 3, d: 4}); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "(function ({a, b, ...r}) {})({a: 1, b: 2, c: 3, d: 4});". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { (function ({a, b, ...r}) {})({a: 1, b: 2, c: 3, d: 4}); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "var a, b, c; ({a, b, ...r} = {a: 1, b: 2, c: 3, d: 4});". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var a, b, c; ({a, b, ...r} = {a: 1, b: 2, c: 3, d: 4}); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "try { throw {a:2} } catch({...rest}) {}". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { try { throw {a:2} } catch({...rest}) {} }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let c = {}; let o = {a: 1, b: 2, ...c};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let c = {}; let o = {a: 1, b: 2, ...c}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let o = {a: 1, b: 3, ...{}};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let o = {a: 1, b: 3, ...{}}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let o = {a: 1, b: 2, ...null, c: 3};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let o = {a: 1, b: 2, ...null, c: 3}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let o = {a: 1, b: 2, ...undefined, c: 3};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let o = {a: 1, b: 2, ...undefined, c: 3}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let o = {a: 1, b: 2, ...{...{}}, c: 3};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let o = {a: 1, b: 2, ...{...{}}, c: 3}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let c = {}; let o = {a: 1, b: 2, ...c, d: 3, ...c, e: 5};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let c = {}; let o = {a: 1, b: 2, ...c, d: 3, ...c, e: 5}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let o = {a: 1, b: 2, ...d = {e: 2}, c: 3};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let o = {a: 1, b: 2, ...d = {e: 2}, c: 3}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let p = true; let o = {a: 1, b: 2, ...d = p ? {e: 2} : {f: 4}, c: 3};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let p = true; let o = {a: 1, b: 2, ...d = p ? {e: 2} : {f: 4}, c: 3}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let o = {a: 1, b: 2, ...(a) => 3, c: 3};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let o = {a: 1, b: 2, ...(a) => 3, c: 3}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function * foo() { return {a: 1, b: 2, ...yield, c: 3}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { function * foo() { return {a: 1, b: 2, ...yield, c: 3}; } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function * foo(o) { ({...{ x = yield }} = o); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { function * foo(o) { ({...{ x = yield }} = o); } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "var {...r = {a: 2}} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var {...r = {a: 2}} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "var {...r, b} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var {...r, b} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "var {...r, ...e} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { var {...r, ...e} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "({...new Object()} = {a: 1, b: 2});". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { ({...new Object()} = {a: 1, b: 2}); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "(function * (o) { ({ ...{ x: yield } } = o); })()". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { (function * (o) { ({ ...{ x: yield } } = o); })() }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "(function () {'use strict'; ({...eval} = {}); })()". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { (function () {'use strict'; ({...eval} = {}); })() }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "(function () {'use strict'; ({...arguments} = {}); })()". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { (function () {'use strict'; ({...arguments} = {}); })() }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "async function foo () { let {...await} = {}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { async function foo () { let {...await} = {}; } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "let {...let} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { let {...let} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "const {...let} = {a: 1, b: 2};". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { const {...let} = {a: 1, b: 2}; }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "try { throw {a:2} } catch({...foo.a}) {}". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { try { throw {a:2} } catch({...foo.a}) {} }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
Rest parameter
PASS Valid: "function foo(...a) { }"
PASS Valid: "function f() { function foo(...a) { } }"
@@ -1344,8 +1344,8 @@
PASS Valid: "function f() { let x = (a = 20, ...[...[b = 40]]) => { } }"
PASS Valid: "let x = (a = 20, ...{b}) => { }"
PASS Valid: "function f() { let x = (a = 20, ...{b}) => { } }"
-PASS Valid: "let x = (a = 20, ...{...b}) => { }"
-PASS Valid: "function f() { let x = (a = 20, ...{...b}) => { } }"
+PASS Invalid: "let x = (a = 20, ...{...b}) => { }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
+PASS Invalid: "function f() { let x = (a = 20, ...{...b}) => { } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
PASS Invalid: "let x = (a = 20, ...{124}) => { }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
PASS Invalid: "function f() { let x = (a = 20, ...{124}) => { } }". Produced the following syntax error: "SyntaxError: Unexpected token '...'"
non-simple parameter list
@@ -1630,8 +1630,8 @@
PASS Invalid: "function f() { ({ foo(a,...a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with a rest parameter."
PASS Invalid: "({ foo({a},...a){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
PASS Invalid: "function f() { ({ foo({a},...a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
-PASS Invalid: "({ foo({...a},...a){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
-PASS Invalid: "function f() { ({ foo({...a},...a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
+PASS Invalid: "({ foo({...a},...a){} });". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { ({ foo({...a},...a){} }); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
PASS Invalid: "({ *foo({a},a){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
PASS Invalid: "function f() { ({ *foo({a},a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
PASS Invalid: "({ *foo(a,{a}){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
@@ -1640,8 +1640,8 @@
PASS Invalid: "function f() { ({ *foo(a,...a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with a rest parameter."
PASS Invalid: "({ *foo({a},...a){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
PASS Invalid: "function f() { ({ *foo({a},...a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
-PASS Invalid: "({ *foo({...a},...a){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
-PASS Invalid: "function f() { ({ *foo({...a},...a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
+PASS Invalid: "({ *foo({...a},...a){} });". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { ({ *foo({...a},...a){} }); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
PASS Invalid: "({ async foo({a},a){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
PASS Invalid: "function f() { ({ async foo({a},a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
PASS Invalid: "({ async foo(a,{a}){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
@@ -1650,16 +1650,16 @@
PASS Invalid: "function f() { ({ async foo(a,...a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with a rest parameter."
PASS Invalid: "({ async foo({a},...a){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
PASS Invalid: "function f() { ({ async foo({a},...a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
-PASS Invalid: "({ async foo({...a},...a){} });". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
-PASS Invalid: "function f() { ({ async foo({...a},...a){} }); }". Produced the following syntax error: "SyntaxError: Duplicate parameter 'a' not allowed in function with destructuring parameters."
+PASS Invalid: "({ async foo({...a},...a){} });". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { ({ async foo({...a},...a){} }); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
PASS Valid: "({ foo(a, ...b){} });"
PASS Valid: "function f() { ({ foo(a, ...b){} }); }"
PASS Valid: "({ foo({a}, ...b){} });"
PASS Valid: "function f() { ({ foo({a}, ...b){} }); }"
-PASS Valid: "({ foo({a, ...b}){} });"
-PASS Valid: "function f() { ({ foo({a, ...b}){} }); }"
-PASS Valid: "({ foo({b, ...a}, ...c){} });"
-PASS Valid: "function f() { ({ foo({b, ...a}, ...c){} }); }"
+PASS Invalid: "({ foo({a, ...b}){} });". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { ({ foo({a, ...b}){} }); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "({ foo({b, ...a}, ...c){} });". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
+PASS Invalid: "function f() { ({ foo({b, ...a}, ...c){} }); }". Produced the following syntax error: "SyntaxError: Unexpected token '...'. Expected a property name."
Weird things that used to crash.
PASS Invalid: "or ([[{break //(elseifo (a=0;a<2;a++)n=
[[{aFYY sga=
Modified: branches/safari-604.1.38.0-branch/LayoutTests/js/script-tests/parser-syntax-check.js (220989 => 220990)
--- branches/safari-604.1.38.0-branch/LayoutTests/js/script-tests/parser-syntax-check.js 2017-08-21 23:31:04 UTC (rev 220989)
+++ branches/safari-604.1.38.0-branch/LayoutTests/js/script-tests/parser-syntax-check.js 2017-08-21 23:31:44 UTC (rev 220990)
@@ -715,25 +715,25 @@
valid("var {x: [y, ...[...[...{z: [...z]}]]]} = 20");
valid("var {x: [y, {z: {z: [...z]}}]} = 20");
invalid("var [...y, ...z] = 20");
-valid("var [...{...y}] = 20");
-valid("var {a, b, ...r} = {a: 1, b: 2, c: 3};");
+invalid("var [...{...y}] = 20");
+invalid("var {a, b, ...r} = {a: 1, b: 2, c: 3};");
invalid("var {a, b, ...{d}} = {a: 1, b: 2, c: 3, d: 4};");
invalid("var {a, b, ...{d = 15}} = {a: 1, b: 2, c: 3, d: 4};");
invalid("var {a, b, ...{d = 15, ...r}} = {a: 1, b: 2, c: 3, d: 4};");
-valid("(({a, b, ...r}) => {})({a: 1, b: 2, c: 3, d: 4});");
-valid("(function ({a, b, ...r}) {})({a: 1, b: 2, c: 3, d: 4});");
-valid("var a, b, c; ({a, b, ...r} = {a: 1, b: 2, c: 3, d: 4});");
-valid("try { throw {a:2} } catch({...rest}) {}");
-valid("let c = {}; let o = {a: 1, b: 2, ...c};");
-valid("let o = {a: 1, b: 3, ...{}};");
-valid("let o = {a: 1, b: 2, ...null, c: 3};");
-valid("let o = {a: 1, b: 2, ...undefined, c: 3};");
-valid("let o = {a: 1, b: 2, ...{...{}}, c: 3};");
-valid("let c = {}; let o = {a: 1, b: 2, ...c, d: 3, ...c, e: 5};");
-valid("let o = {a: 1, b: 2, ...d = {e: 2}, c: 3};");
-valid("let p = true; let o = {a: 1, b: 2, ...d = p ? {e: 2} : {f: 4}, c: 3};");
-valid("let o = {a: 1, b: 2, ...(a) => 3, c: 3};");
-valid("function * foo() { return {a: 1, b: 2, ...yield, c: 3}; }");
+invalid("(({a, b, ...r}) => {})({a: 1, b: 2, c: 3, d: 4});");
+invalid("(function ({a, b, ...r}) {})({a: 1, b: 2, c: 3, d: 4});");
+invalid("var a, b, c; ({a, b, ...r} = {a: 1, b: 2, c: 3, d: 4});");
+invalid("try { throw {a:2} } catch({...rest}) {}");
+invalid("let c = {}; let o = {a: 1, b: 2, ...c};");
+invalid("let o = {a: 1, b: 3, ...{}};");
+invalid("let o = {a: 1, b: 2, ...null, c: 3};");
+invalid("let o = {a: 1, b: 2, ...undefined, c: 3};");
+invalid("let o = {a: 1, b: 2, ...{...{}}, c: 3};");
+invalid("let c = {}; let o = {a: 1, b: 2, ...c, d: 3, ...c, e: 5};");
+invalid("let o = {a: 1, b: 2, ...d = {e: 2}, c: 3};");
+invalid("let p = true; let o = {a: 1, b: 2, ...d = p ? {e: 2} : {f: 4}, c: 3};");
+invalid("let o = {a: 1, b: 2, ...(a) => 3, c: 3};");
+invalid("function * foo() { return {a: 1, b: 2, ...yield, c: 3}; }");
invalid("function * foo(o) { ({...{ x = yield }} = o); }");
invalid("var {...r = {a: 2}} = {a: 1, b: 2};");
invalid("var {...r, b} = {a: 1, b: 2};");
@@ -781,7 +781,7 @@
valid("let x = (a = 20, ...[...b]) => { }");
valid("let x = (a = 20, ...[...[b = 40]]) => { }");
valid("let x = (a = 20, ...{b}) => { }");
-valid("let x = (a = 20, ...{...b}) => { }");
+invalid("let x = (a = 20, ...{...b}) => { }");
invalid("let x = (a = 20, ...{124}) => { }");
debug("non-simple parameter list")
@@ -940,8 +940,8 @@
invalid("({ async foo({...a},...a){} });");
valid("({ foo(a, ...b){} });");
valid("({ foo({a}, ...b){} });");
-valid("({ foo({a, ...b}){} });");
-valid("({ foo({b, ...a}, ...c){} });");
+invalid("({ foo({a, ...b}){} });");
+invalid("({ foo({b, ...a}, ...c){} });");
debug("Weird things that used to crash.");
invalid(`or ([[{break //(elseifo (a=0;a<2;a++)n=