diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-1-update-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-1-update-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..1bd6f94f614e92d6abf500b55a4a828f4dba5bb1 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-1-update-expression.js @@ -0,0 +1,46 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and UpdateExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + UpdateExpressions +esid: prod-ImportCall +info: | + Update Expressions + Static Semantics: Early Errors + + UpdateExpression: + LeftHandSideExpression++ + LeftHandSideExpression-- + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('')++ diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-10-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-10-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..3c3c8133c669de13954de56efd8a463c7d9a9921 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-10-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') -= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-11-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-11-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..f77b454a49b196d3c5108f4ac890923e554122ac --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-11-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') <<= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-12-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-12-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..d89bc729e9ba454268a7048b6a908ba92c7f0e65 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-12-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') >>= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-13-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-13-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..de6a9e137500fa476acbb981021c2e2b953f01b3 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-13-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') >>>= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-14-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-14-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..9d08c58715b62cec24505b34dee56b32d0d2543c --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-14-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') &= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-15-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-15-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..991c6021668244a4c3785765ac12c91728a6797d --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-15-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') ^= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-16-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-16-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..da8fb2559628434cb9c63dc2d2a34589eb0f93db --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-16-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') |= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-17-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-17-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..12c453cfb80979acedfb568a4dc835c1368f7b22 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-17-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') **= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-2-update-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-2-update-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..3ab6c49d9fc490919f60a4cb086c19d39104c690 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-2-update-expression.js @@ -0,0 +1,46 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and UpdateExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + UpdateExpressions +esid: prod-ImportCall +info: | + Update Expressions + Static Semantics: Early Errors + + UpdateExpression: + LeftHandSideExpression++ + LeftHandSideExpression-- + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('')-- diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-3-update-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-3-update-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..6be301875c587d0794c80541d670b7eda6ae3915 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-3-update-expression.js @@ -0,0 +1,46 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and UnaryExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + UpdateExpressions +esid: prod-ImportCall +info: | + Update Expressions + Static Semantics: Early Errors + + UpdateExpression: + ++UnaryExpression + --UnaryExpression + + - It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +++import('') diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-4-update-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-4-update-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..b1f2491bac6b50df6ca169fca7a72e8ab1135534 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-4-update-expression.js @@ -0,0 +1,46 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and UnaryExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + UpdateExpressions +esid: prod-ImportCall +info: | + Update Expressions + Static Semantics: Early Errors + + UpdateExpression: + ++UnaryExpression + --UnaryExpression + + - It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +--import('') diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-5-lhs-equals-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-5-lhs-equals-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..a70ca47f5db7d3004fe8dea4c3a27713b3fb1ab9 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-5-lhs-equals-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') = 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-6-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-6-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..74fbb6ec76d9b2139bb1bf96259cf1e123704d62 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-6-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') *= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-7-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-7-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..1bc28b198902f726ff81def6ffb7c435e2592b77 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-7-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') /= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-8-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-8-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..f236f79cd52e7a205479524f3204b46763be3540 --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-8-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') %= 1; diff --git a/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-9-lhs-assignment-operator-assignment-expression.js b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-9-lhs-assignment-operator-assignment-expression.js new file mode 100644 index 0000000000000000000000000000000000000000..a75aafe35e565bd4aa59d119a5f1e2c29f6a02ec --- /dev/null +++ b/test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-9-lhs-assignment-operator-assignment-expression.js @@ -0,0 +1,48 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + ImportCall is a valid CallExpression and LHSExpression, but it is an invalid + AssginmentTargetType then it should throw a ReferenceError if used in some + LHS Expression of a AssignmentExpression production +esid: prod-ImportCall +info: | + Assignment Operators + Static Semantics: Early Errors + + AssignmentExpression : LeftHandSideExpression = AssignmentExpression + + - It is an early Reference Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of LeftHandSideExpression is invalid. + + AssignmentExpression : LeftHandSideExpression AssignmentOperator AssignmentExpression + + - It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + + LeftHandSideExpression: + NewExpression + CallExpression + + CallExpression: + ImportCall + + Left-Hand-Side Expressions + Static Semantics: AssignmentTargetType + #sec-static-semantics-static-semantics-assignmenttargettype + + CallExpression : + MemberExpressionArguments + SuperCall + ImportCall + CallExpressionArguments + CallExpressionTemplateLiteral + + 1. Return invalid +negative: + phase: parse + type: ReferenceError +features: [dynamic-import] +---*/ + +throw "Test262: This statement should not be evaluated."; + +import('') += 1;