diff --git a/src/invalid-private-names/default/cls-decl-inner-method.template b/src/invalid-private-names/default/cls-decl-inner-method.template deleted file mode 100644 index 285973029e..0000000000 --- a/src/invalid-private-names/default/cls-decl-inner-method.template +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2018 Leo Balter. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -path: language/statements/class/elements/syntax/early-errors/invalid-names/method-inner- -name: > - Invalid private names should throw a SyntaxError, - method in inner class declaration -features: [class, class-fields-private] -esid: sec-static-semantics-early-errors -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. -negative: - phase: parse - type: SyntaxError ----*/ - -$DONOTEVALUATE(); - -class C { - #x = 42; - m() { - class Inner { - z() { /*{ body }*/ } - } - } -} diff --git a/src/invalid-private-names/default/cls-expr-inner-method.template b/src/invalid-private-names/default/cls-expr-inner-method.template deleted file mode 100644 index afe21203a0..0000000000 --- a/src/invalid-private-names/default/cls-expr-inner-method.template +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2018 Leo Balter. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -path: language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner- -name: > - Invalid private names should throw a SyntaxError, - method in inner class expression -features: [class, class-fields-private] -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. -esid: sec-static-semantics-early-errors -negative: - phase: parse - type: SyntaxError ----*/ - -$DONOTEVALUATE(); - -var C = class { - #x = 42; - m() { - class Inner { - z() { /*{ body }*/ } - } - } -}; diff --git a/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js b/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js deleted file mode 100644 index eaa9f0a47a..0000000000 --- a/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/invalid-private-names/call-expression-bad-reference.case -// - src/invalid-private-names/default/cls-expr-inner-method.template -/*--- -description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in inner class expression) -esid: sec-static-semantics-early-errors -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. - - - Static Semantics: AllPrivateNamesValid - - MemberExpression : MemberExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - - CallExpression : CallExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - ----*/ - - -$DONOTEVALUATE(); - -var C = class { - #x = 42; - m() { - class Inner { - z() { (() => {})().#x } - } - } -}; diff --git a/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js b/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js deleted file mode 100644 index 75e392e56d..0000000000 --- a/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/invalid-private-names/call-expression-this.case -// - src/invalid-private-names/default/cls-expr-inner-method.template -/*--- -description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in inner class expression) -esid: sec-static-semantics-early-errors -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. - - - Static Semantics: AllPrivateNamesValid - - MemberExpression : MemberExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - - CallExpression : CallExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - ----*/ - - -$DONOTEVALUATE(); - -var C = class { - #x = 42; - m() { - class Inner { - z() { (() => this)().#x } - } - } -}; diff --git a/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js b/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js deleted file mode 100644 index 5d6af39f83..0000000000 --- a/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/invalid-private-names/member-expression-bad-reference.case -// - src/invalid-private-names/default/cls-expr-inner-method.template -/*--- -description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in inner class expression) -esid: sec-static-semantics-early-errors -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. - - - Static Semantics: AllPrivateNamesValid - - MemberExpression : MemberExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - - CallExpression : CallExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - ----*/ - - -$DONOTEVALUATE(); - -var C = class { - #x = 42; - m() { - class Inner { - z() { something.#x } - } - } -}; diff --git a/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js b/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js deleted file mode 100644 index 22734ed775..0000000000 --- a/test/language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/invalid-private-names/member-expression-this.case -// - src/invalid-private-names/default/cls-expr-inner-method.template -/*--- -description: this reference in member expression (Invalid private names should throw a SyntaxError, method in inner class expression) -esid: sec-static-semantics-early-errors -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. - - - Static Semantics: AllPrivateNamesValid - - MemberExpression : MemberExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - - CallExpression : CallExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - ----*/ - - -$DONOTEVALUATE(); - -var C = class { - #x = 42; - m() { - class Inner { - z() { this.#x } - } - } -}; diff --git a/test/language/expressions/postfix-decrement/arguments-nostrict.js b/test/language/expressions/postfix-decrement/arguments-nostrict.js index b0b853549f..bc20c7d487 100644 --- a/test/language/expressions/postfix-decrement/arguments-nostrict.js +++ b/test/language/expressions/postfix-decrement/arguments-nostrict.js @@ -22,4 +22,6 @@ info: | flags: [noStrict] ---*/ -arguments--; +if (false) { + arguments--; +} diff --git a/test/language/expressions/postfix-increment/arguments-nostrict.js b/test/language/expressions/postfix-increment/arguments-nostrict.js index 687a6b919f..8a330bfbf1 100644 --- a/test/language/expressions/postfix-increment/arguments-nostrict.js +++ b/test/language/expressions/postfix-increment/arguments-nostrict.js @@ -22,4 +22,6 @@ info: | flags: [noStrict] ---*/ -arguments++; +if (false) { + arguments++; +} diff --git a/test/language/expressions/prefix-decrement/arguments-nostrict.js b/test/language/expressions/prefix-decrement/arguments-nostrict.js index b35bbcf51a..46b8427d9b 100644 --- a/test/language/expressions/prefix-decrement/arguments-nostrict.js +++ b/test/language/expressions/prefix-decrement/arguments-nostrict.js @@ -22,4 +22,6 @@ info: | flags: [noStrict] ---*/ ---arguments; +if (false) { + --arguments; +} diff --git a/test/language/expressions/prefix-increment/arguments-nostrict.js b/test/language/expressions/prefix-increment/arguments-nostrict.js index 557fe91383..a7f24bcc33 100644 --- a/test/language/expressions/prefix-increment/arguments-nostrict.js +++ b/test/language/expressions/prefix-increment/arguments-nostrict.js @@ -22,4 +22,6 @@ info: | flags: [noStrict] ---*/ -++arguments; +if (false) { + ++arguments; +} diff --git a/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js b/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js deleted file mode 100644 index 8f8277bb1b..0000000000 --- a/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/invalid-private-names/call-expression-bad-reference.case -// - src/invalid-private-names/default/cls-decl-inner-method.template -/*--- -description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in inner class declaration) -esid: sec-static-semantics-early-errors -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. - - - Static Semantics: AllPrivateNamesValid - - MemberExpression : MemberExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - - CallExpression : CallExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - ----*/ - - -$DONOTEVALUATE(); - -class C { - #x = 42; - m() { - class Inner { - z() { (() => {})().#x } - } - } -} diff --git a/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js b/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js deleted file mode 100644 index f97faa1c65..0000000000 --- a/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/invalid-private-names/call-expression-this.case -// - src/invalid-private-names/default/cls-decl-inner-method.template -/*--- -description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in inner class declaration) -esid: sec-static-semantics-early-errors -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. - - - Static Semantics: AllPrivateNamesValid - - MemberExpression : MemberExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - - CallExpression : CallExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - ----*/ - - -$DONOTEVALUATE(); - -class C { - #x = 42; - m() { - class Inner { - z() { (() => this)().#x } - } - } -} diff --git a/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js b/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js deleted file mode 100644 index 58db4909b1..0000000000 --- a/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/invalid-private-names/member-expression-bad-reference.case -// - src/invalid-private-names/default/cls-decl-inner-method.template -/*--- -description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in inner class declaration) -esid: sec-static-semantics-early-errors -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. - - - Static Semantics: AllPrivateNamesValid - - MemberExpression : MemberExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - - CallExpression : CallExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - ----*/ - - -$DONOTEVALUATE(); - -class C { - #x = 42; - m() { - class Inner { - z() { something.#x } - } - } -} diff --git a/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js b/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js deleted file mode 100644 index 820cc19245..0000000000 --- a/test/language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/invalid-private-names/member-expression-this.case -// - src/invalid-private-names/default/cls-decl-inner-method.template -/*--- -description: this reference in member expression (Invalid private names should throw a SyntaxError, method in inner class declaration) -esid: sec-static-semantics-early-errors -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - ScriptBody:StatementList - It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List - as an argument is false unless the source code is eval code that is being - processed by a direct eval. - - ModuleBody:ModuleItemList - It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List - as an argument is false. - - Static Semantics: AllPrivateNamesValid - - ClassBody : ClassElementList - 1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody. - 2. Return AllPrivateNamesValid of ClassElementList with the argument newNames. - - For all other grammatical productions, recurse on subexpressions/substatements, - passing in the names of the caller. If all pieces return true, then return true. - If any returns false, return false. - - - Static Semantics: AllPrivateNamesValid - - MemberExpression : MemberExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - - CallExpression : CallExpression . PrivateName - - 1. If StringValue of PrivateName is in names, return true. - 2. Return false. - ----*/ - - -$DONOTEVALUATE(); - -class C { - #x = 42; - m() { - class Inner { - z() { this.#x } - } - } -}