diff --git a/test/language/expressions/assignment/target-cover-id.js b/test/language/expressions/assignment/target-cover-id.js new file mode 100644 index 0000000000000000000000000000000000000000..6abdf7301a9a87d6ea9630a80094d28cdbd9e0a6 --- /dev/null +++ b/test/language/expressions/assignment/target-cover-id.js @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-assignment-operators-static-semantics-early-errors +es6id: 12.14.1 +es5id: 11.1.6_A3_T5 +description: Applied to a "covered" IdentifierReference +info: | + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an + ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + Static Semantics: IsValidSimpleAssignmentTarget + + IdentifierReference : Identifier + + 1. If this IdentifierReference is contained in strict mode code and + StringValue of Identifier is "eval" or "arguments", return false. + 2. Return true. +---*/ + +var x; + +(x) = 1; + +assert.sameValue(x, 1); diff --git a/test/language/expressions/assignment/target-cover-newtarget.js b/test/language/expressions/assignment/target-cover-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..2442cac6e95f51e8b68754801c6aef03523a240d --- /dev/null +++ b/test/language/expressions/assignment/target-cover-newtarget.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-assignment-operators-static-semantics-early-errors +es6id: 12.14.1 +description: Applied to a "covered" new.target +info: | + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an + ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + (new.target) = 1; +} diff --git a/test/language/expressions/assignment/target-cover-yieldexpr.js b/test/language/expressions/assignment/target-cover-yieldexpr.js new file mode 100644 index 0000000000000000000000000000000000000000..0cfad36ebc1390c343351c58d9d5583fba05e5ae --- /dev/null +++ b/test/language/expressions/assignment/target-cover-yieldexpr.js @@ -0,0 +1,29 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-assignment-operators-static-semantics-early-errors +es6id: 12.14.1 +description: Applied to a "covered" YieldExpression +info: | + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an + ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + 12.15.3 Static Semantics: IsValidSimpleAssignmentTarget + + AssignmentExpression: + YieldExpression + ArrowFunction + LeftHandSideExpression = AssignmentExpression + LeftHandSideExpression AssignmentOperator AssignmentExpression + + 1. Return false. +features: [generators] +negative: ReferenceError +---*/ + +function* g() { + (yield) = 1; +} diff --git a/test/language/expressions/assignment/target-newtarget.js b/test/language/expressions/assignment/target-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..b4ebd6b5967d75f3df4ce0b4fdfdfaac90e9546d --- /dev/null +++ b/test/language/expressions/assignment/target-newtarget.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-assignment-operators-static-semantics-early-errors +es6id: 12.14.1 +description: Applied to new.target +info: | + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an + ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + new.target = 1; +} diff --git a/test/language/expressions/grouping/S11.1.6_A3_T5.js b/test/language/expressions/grouping/S11.1.6_A3_T5.js deleted file mode 100644 index 9f0e0ada1dec3c4ef8d5d2b7221218744ffcdf6c..0000000000000000000000000000000000000000 --- a/test/language/expressions/grouping/S11.1.6_A3_T5.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: "\"This\" operator only evaluates Expression" -es5id: 11.1.6_A3_T5 -description: Using grouping operator in declaration of variables ----*/ - -//CHECK#1 -var x; -(x) = 1; -if (x !== 1) { - $ERROR('#1: (x) = 1; x === 1. Actual: ' + (x)); -} - -//CHECK#2 -var y = 1; (y)++; ++(y); (y)--; --(y); -if (y !== 1) { - $ERROR('#2: var y = 1; (y)++; ++(y); (y)--; --(y); y === 1. Actual: ' + (y)); -} diff --git a/test/language/expressions/postfix-decrement/target-cover-id.js b/test/language/expressions/postfix-decrement/target-cover-id.js new file mode 100644 index 0000000000000000000000000000000000000000..446b5cb0f8353afa82e0cbf4fe0a1941559ec957 --- /dev/null +++ b/test/language/expressions/postfix-decrement/target-cover-id.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-postfix-expressions-static-semantics-early-errors +es6id: 12.4.1 +es5id: 11.1.6_A3_T5 +description: Applied to a "covered" IdentifierReference +info: | + PostfixExpression : + LeftHandSideExpression ++ + LeftHandSideExpression -- + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + Static Semantics: IsValidSimpleAssignmentTarget + + IdentifierReference : Identifier + + 1. If this IdentifierReference is contained in strict mode code and + StringValue of Identifier is "eval" or "arguments", return false. + 2. Return true. +---*/ + +var y = 1; + +(y)--; + +assert.sameValue(y, 0); diff --git a/test/language/expressions/postfix-decrement/target-cover-newtarget.js b/test/language/expressions/postfix-decrement/target-cover-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..55e3789d408103768e9fb01a08f15182bce2d693 --- /dev/null +++ b/test/language/expressions/postfix-decrement/target-cover-newtarget.js @@ -0,0 +1,27 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-postfix-expressions-static-semantics-early-errors +es6id: 12.4.1 +description: Applied to a "covered" new.target +info: | + PostfixExpression : + LeftHandSideExpression ++ + LeftHandSideExpression -- + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + (new.target)--; +} diff --git a/test/language/expressions/postfix-decrement/target-cover-yieldexpr.js b/test/language/expressions/postfix-decrement/target-cover-yieldexpr.js new file mode 100644 index 0000000000000000000000000000000000000000..4d7448ae89834f6e791cccde625f22fe2e21f49b --- /dev/null +++ b/test/language/expressions/postfix-decrement/target-cover-yieldexpr.js @@ -0,0 +1,30 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-postfix-expressions-static-semantics-early-errors +es6id: 12.4.1 +description: Applied to a "covered" YieldExpression +info: | + PostfixExpression : + LeftHandSideExpression ++ + LeftHandSideExpression -- + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + 12.15.3 Static Semantics: IsValidSimpleAssignmentTarget + + AssignmentExpression: + YieldExpression + ArrowFunction + LeftHandSideExpression = AssignmentExpression + LeftHandSideExpression AssignmentOperator AssignmentExpression + + 1. Return false. +features: [generators] +negative: ReferenceError +---*/ + +function* g() { + (yield)--; +} diff --git a/test/language/expressions/postfix-decrement/target-newtarget.js b/test/language/expressions/postfix-decrement/target-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..bddee29f1ed2b259b6905bd7088e5a31cce319e1 --- /dev/null +++ b/test/language/expressions/postfix-decrement/target-newtarget.js @@ -0,0 +1,27 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-postfix-expressions-static-semantics-early-errors +es6id: 12.4.1 +description: Applied to new.target +info: | + PostfixExpression : + LeftHandSideExpression ++ + LeftHandSideExpression -- + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + new.target--; +} diff --git a/test/language/expressions/postfix-increment/target-cover-id.js b/test/language/expressions/postfix-increment/target-cover-id.js new file mode 100644 index 0000000000000000000000000000000000000000..b01ce5f05ed48fa733e8d62fdf757871e3fff4d5 --- /dev/null +++ b/test/language/expressions/postfix-increment/target-cover-id.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-postfix-expressions-static-semantics-early-errors +es6id: 12.4.1 +es5id: 11.1.6_A3_T5 +description: Applied to a "covered" IdentifierReference +info: | + PostfixExpression : + LeftHandSideExpression ++ + LeftHandSideExpression -- + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + Static Semantics: IsValidSimpleAssignmentTarget + + IdentifierReference : Identifier + + 1. If this IdentifierReference is contained in strict mode code and + StringValue of Identifier is "eval" or "arguments", return false. + 2. Return true. +---*/ + +var y = 1; + +(y)++; + +assert.sameValue(y, 2); diff --git a/test/language/expressions/postfix-increment/target-cover-newtarget.js b/test/language/expressions/postfix-increment/target-cover-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..7168110cf022295446d271b216ea74863ebfd0bb --- /dev/null +++ b/test/language/expressions/postfix-increment/target-cover-newtarget.js @@ -0,0 +1,27 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-postfix-expressions-static-semantics-early-errors +es6id: 12.4.1 +description: Applied to a "covered" new.target +info: | + PostfixExpression : + LeftHandSideExpression ++ + LeftHandSideExpression -- + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + (new.target)++; +} diff --git a/test/language/expressions/postfix-increment/target-cover-yieldexpr.js b/test/language/expressions/postfix-increment/target-cover-yieldexpr.js new file mode 100644 index 0000000000000000000000000000000000000000..3fdc200d01cbe8cec1ea9586245cce08258e39dd --- /dev/null +++ b/test/language/expressions/postfix-increment/target-cover-yieldexpr.js @@ -0,0 +1,30 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-postfix-expressions-static-semantics-early-errors +es6id: 12.4.1 +description: Applied to a "covered" YieldExpression +info: | + PostfixExpression : + LeftHandSideExpression ++ + LeftHandSideExpression -- + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + 12.15.3 Static Semantics: IsValidSimpleAssignmentTarget + + AssignmentExpression: + YieldExpression + ArrowFunction + LeftHandSideExpression = AssignmentExpression + LeftHandSideExpression AssignmentOperator AssignmentExpression + + 1. Return false. +features: [generators] +negative: ReferenceError +---*/ + +function* g() { + (yield)++; +} diff --git a/test/language/expressions/postfix-increment/target-newtarget.js b/test/language/expressions/postfix-increment/target-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..1cc7a2d226285348c7247ba99f65dda2fa997b69 --- /dev/null +++ b/test/language/expressions/postfix-increment/target-newtarget.js @@ -0,0 +1,27 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-postfix-expressions-static-semantics-early-errors +es6id: 12.4.1 +description: Applied to new.target +info: | + PostfixExpression : + LeftHandSideExpression ++ + LeftHandSideExpression -- + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + LeftHandSideExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + new.target++; +} diff --git a/test/language/expressions/prefix-decrement/target-cover-id.js b/test/language/expressions/prefix-decrement/target-cover-id.js new file mode 100644 index 0000000000000000000000000000000000000000..476c4f2fed3644c3fbc1eb27b6883f95e054efd8 --- /dev/null +++ b/test/language/expressions/prefix-decrement/target-cover-id.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-unary-operators-static-semantics-early-errors +es6id: 12.5.1 +es5id: 11.1.6_A3_T5 +description: Applied to a "covered" IdentifierReference +info: | + UnaryExpression : + ++ UnaryExpression + -- UnaryExpression + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + UnaryExpression is false. + + Static Semantics: IsValidSimpleAssignmentTarget + + IdentifierReference : Identifier + + 1. If this IdentifierReference is contained in strict mode code and + StringValue of Identifier is "eval" or "arguments", return false. + 2. Return true. +---*/ + +var y = 1; + +--(y); + +assert.sameValue(y, 0); diff --git a/test/language/expressions/prefix-decrement/target-cover-newtarget.js b/test/language/expressions/prefix-decrement/target-cover-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..3037aca67abd2c3ad92078eeda2b27b274597ad3 --- /dev/null +++ b/test/language/expressions/prefix-decrement/target-cover-newtarget.js @@ -0,0 +1,27 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-unary-operators-static-semantics-early-errors +es6id: 12.5.1 +description: Applied to a "covered" new.target +info: | + UnaryExpression : + ++ UnaryExpression + -- UnaryExpression + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + UnaryExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + --(new.target); +} diff --git a/test/language/expressions/prefix-decrement/target-cover-yieldexpr.js b/test/language/expressions/prefix-decrement/target-cover-yieldexpr.js new file mode 100644 index 0000000000000000000000000000000000000000..fbf6cbb2ccbe161da37d134fb3414397ce64ea96 --- /dev/null +++ b/test/language/expressions/prefix-decrement/target-cover-yieldexpr.js @@ -0,0 +1,30 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-unary-operators-static-semantics-early-errors +es6id: 12.5.1 +description: Applied to a "covered" YieldExpression +info: | + UnaryExpression : + ++ UnaryExpression + -- UnaryExpression + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + UnaryExpression is false. + + 12.15.3 Static Semantics: IsValidSimpleAssignmentTarget + + AssignmentExpression: + YieldExpression + ArrowFunction + LeftHandSideExpression = AssignmentExpression + LeftHandSideExpression AssignmentOperator AssignmentExpression + + 1. Return false. +features: [generators] +negative: ReferenceError +---*/ + +function* g() { + --(yield); +} diff --git a/test/language/expressions/prefix-decrement/target-newtarget.js b/test/language/expressions/prefix-decrement/target-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..4f8d1ecbef5eedd6f207666f39f05f30114087c4 --- /dev/null +++ b/test/language/expressions/prefix-decrement/target-newtarget.js @@ -0,0 +1,27 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-unary-operators-static-semantics-early-errors +es6id: 12.5.1 +description: Applied to new.target +info: | + UnaryExpression : + ++ UnaryExpression + -- UnaryExpression + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + UnaryExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + --new.target; +} diff --git a/test/language/expressions/prefix-increment/target-cover-id.js b/test/language/expressions/prefix-increment/target-cover-id.js new file mode 100644 index 0000000000000000000000000000000000000000..1c4b8d91f84e333b4902ff2261b5c1b565f5bcd6 --- /dev/null +++ b/test/language/expressions/prefix-increment/target-cover-id.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-unary-operators-static-semantics-early-errors +es6id: 12.5.1 +es5id: 11.1.6_A3_T5 +description: Applied to a "covered" IdentifierReference +info: | + UnaryExpression : + ++ UnaryExpression + -- UnaryExpression + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + UnaryExpression is false. + + Static Semantics: IsValidSimpleAssignmentTarget + + IdentifierReference : Identifier + + 1. If this IdentifierReference is contained in strict mode code and + StringValue of Identifier is "eval" or "arguments", return false. + 2. Return true. +---*/ + +var y = 1; + +++(y); + +assert.sameValue(y, 2); diff --git a/test/language/expressions/prefix-increment/target-cover-newtarget.js b/test/language/expressions/prefix-increment/target-cover-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..113b4a2074a28df482e0c41c08eeef967c02acea --- /dev/null +++ b/test/language/expressions/prefix-increment/target-cover-newtarget.js @@ -0,0 +1,27 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-unary-operators-static-semantics-early-errors +es6id: 12.5.1 +description: Applied to a "covered" new.target +info: | + UnaryExpression : + ++ UnaryExpression + -- UnaryExpression + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + UnaryExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + ++(new.target); +} diff --git a/test/language/expressions/prefix-increment/target-cover-yieldexpr.js b/test/language/expressions/prefix-increment/target-cover-yieldexpr.js new file mode 100644 index 0000000000000000000000000000000000000000..10ee8602e117f483defc0be2f2bc6fab966a579e --- /dev/null +++ b/test/language/expressions/prefix-increment/target-cover-yieldexpr.js @@ -0,0 +1,30 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-unary-operators-static-semantics-early-errors +es6id: 12.5.1 +description: Applied to a "covered" YieldExpression +info: | + UnaryExpression : + ++ UnaryExpression + -- UnaryExpression + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + UnaryExpression is false. + + 12.15.3 Static Semantics: IsValidSimpleAssignmentTarget + + AssignmentExpression: + YieldExpression + ArrowFunction + LeftHandSideExpression = AssignmentExpression + LeftHandSideExpression AssignmentOperator AssignmentExpression + + 1. Return false. +features: [generators] +negative: ReferenceError +---*/ + +function* g() { + ++(yield); +} diff --git a/test/language/expressions/prefix-increment/target-newtarget.js b/test/language/expressions/prefix-increment/target-newtarget.js new file mode 100644 index 0000000000000000000000000000000000000000..928f32b8c9f0ec34b585495399f1abfcc29a4a5a --- /dev/null +++ b/test/language/expressions/prefix-increment/target-newtarget.js @@ -0,0 +1,27 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-unary-operators-static-semantics-early-errors +es6id: 12.5.1 +description: Applied to new.target +info: | + UnaryExpression : + ++ UnaryExpression + -- UnaryExpression + + - It is an early Reference Error if IsValidSimpleAssignmentTarget of + UnaryExpression is false. + + 12.3.1.5 Static Semantics: IsValidSimpleAssignmentTarget + + NewTarget: + + new.target + + 1. Return false. +negative: ReferenceError +---*/ + +function f() { + ++new.target; +} diff --git a/test/language/expressions/yield/invalid-left-hand-side.js b/test/language/expressions/yield/invalid-left-hand-side.js new file mode 100644 index 0000000000000000000000000000000000000000..e5d000a9146c91205a610194ac4ef2a4f529c98e --- /dev/null +++ b/test/language/expressions/yield/invalid-left-hand-side.js @@ -0,0 +1,24 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-generator-function-definitions +es6id: 14.4 +description: A YieldExpression is not a valid LeftHandSideExpression +info: | + AssignmentExpression[In, Yield] : + ConditionalExpression[?In, ?Yield] + [+Yield]YieldExpression[?In] + ArrowFunction[?In, ?Yield] + LeftHandSideExpression[?Yield] = AssignmentExpression[?In, ?Yield] + LeftHandSideExpression[?Yield] AssignmentOperator AssignmentExpression[?In, ?Yield] + + LeftHandSideExpression[Yield] : + NewExpression[?Yield] + CallExpression[?Yield] +features: [generators] +negative: SyntaxError +---*/ + +function* g() { + yield = 1; +}