From 0298174c06d3920bce9952e142d3515408ada89e Mon Sep 17 00:00:00 2001 From: Rick Waldron <waldron.rick@gmail.com> Date: Wed, 1 Aug 2018 11:22:55 -0400 Subject: [PATCH] Class Fields: minor updates to existing templates to improve output source --- .../eval-err-contains-newtarget.case | 3 +- .../eval-err-contains-supercall-1.case | 4 +- .../eval-err-contains-supercall-2.case | 2 +- .../eval-err-contains-supercall.case | 3 +- .../eval-err-contains-superproperty-1.case | 3 +- src/class-fields/private-names.case | 27 ++++++------ ...ls-decl-after-same-line-async-gen.template | 2 +- ...decl-after-same-line-async-method.template | 2 +- .../cls-decl-after-same-line-gen.template | 2 +- .../cls-decl-after-same-line-method.template | 2 +- ...-after-same-line-static-async-gen.template | 2 +- ...ter-same-line-static-async-method.template | 2 +- ...s-decl-after-same-line-static-gen.template | 2 +- ...ecl-after-same-line-static-method.template | 2 +- .../cls-decl-multiple-definitions.template | 2 +- ...decl-multiple-stacked-definitions.template | 2 +- .../cls-decl-new-no-sc-line-method.template | 2 +- .../cls-decl-new-sc-line-generator.template | 2 +- .../cls-decl-new-sc-line-method.template | 2 +- .../cls-decl-regular-definitions.template | 2 +- .../cls-decl-same-line-generator.template | 2 +- .../cls-decl-same-line-method.template | 2 +- .../cls-decl-wrapped-in-sc.template | 2 +- ...ls-expr-after-same-line-async-gen.template | 2 +- ...expr-after-same-line-async-method.template | 2 +- .../cls-expr-after-same-line-gen.template | 2 +- .../cls-expr-after-same-line-method.template | 2 +- ...-after-same-line-static-async-gen.template | 2 +- ...ter-same-line-static-async-method.template | 2 +- ...s-expr-after-same-line-static-gen.template | 2 +- ...xpr-after-same-line-static-method.template | 2 +- .../cls-expr-multiple-definitions.template | 2 +- ...expr-multiple-stacked-definitions.template | 2 +- .../cls-expr-new-no-sc-line-method.template | 2 +- .../cls-expr-new-sc-line-generator.template | 2 +- .../cls-expr-new-sc-line-method.template | 2 +- .../cls-expr-regular-definitions.template | 2 +- .../cls-expr-same-line-generator.template | 2 +- .../cls-expr-same-line-method.template | 2 +- .../cls-expr-wrapped-in-sc.template | 2 +- src/class-fields/static-private-fields.case | 30 +++++++------- src/class-fields/static-private-methods.case | 41 +++++++++---------- 42 files changed, 93 insertions(+), 88 deletions(-) diff --git a/src/class-fields/eval-err-contains-newtarget.case b/src/class-fields/eval-err-contains-newtarget.case index c3c88f4369..deb2e6c4f0 100644 --- a/src/class-fields/eval-err-contains-newtarget.case +++ b/src/class-fields/eval-err-contains-newtarget.case @@ -13,9 +13,10 @@ info: | Additional Early Error Rules for Eval Outside Functions These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains NewTarget. + features: [class, new.target] template: initializer-eval-newtarget ---*/ diff --git a/src/class-fields/eval-err-contains-supercall-1.case b/src/class-fields/eval-err-contains-supercall-1.case index 5700ca64ee..e1a5370b03 100644 --- a/src/class-fields/eval-err-contains-supercall-1.case +++ b/src/class-fields/eval-err-contains-supercall-1.case @@ -13,16 +13,16 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. + features: [class, class-fields-public] template: initializer-eval-super-call ---*/ //- initializer super()['x'] - //- earlyerror SyntaxError //- executionerror diff --git a/src/class-fields/eval-err-contains-supercall-2.case b/src/class-fields/eval-err-contains-supercall-2.case index 1c6a7b00b7..0d0f937089 100644 --- a/src/class-fields/eval-err-contains-supercall-2.case +++ b/src/class-fields/eval-err-contains-supercall-2.case @@ -6,7 +6,7 @@ desc: error if `super().x` in StatementList of eval info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. diff --git a/src/class-fields/eval-err-contains-supercall.case b/src/class-fields/eval-err-contains-supercall.case index 9681120f08..89a012780c 100644 --- a/src/class-fields/eval-err-contains-supercall.case +++ b/src/class-fields/eval-err-contains-supercall.case @@ -13,9 +13,10 @@ info: | Additional Early Error Rules for Eval Outside Constructor Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperCall. + features: [class, class-fields-public] template: initializer-eval-super-call ---*/ diff --git a/src/class-fields/eval-err-contains-superproperty-1.case b/src/class-fields/eval-err-contains-superproperty-1.case index 14706db8de..564ad5342f 100644 --- a/src/class-fields/eval-err-contains-superproperty-1.case +++ b/src/class-fields/eval-err-contains-superproperty-1.case @@ -13,9 +13,10 @@ info: | Additional Early Error Rules for Eval Outside Methods These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. - ScriptBody:StatementList + ScriptBody : StatementList It is a Syntax Error if StatementList Contains SuperProperty. + features: [class, class-fields-public] template: initializer-eval-super-property ---*/ diff --git a/src/class-fields/private-names.case b/src/class-fields/private-names.case index 0300803790..3dcb1df325 100644 --- a/src/class-fields/private-names.case +++ b/src/class-fields/private-names.case @@ -2,20 +2,21 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -desc: static literal private names +desc: private names info: | - ClassElement: + ClassElement : ... FieldDefinition ; - FieldDefinition: + FieldDefinition : ClassElementName Initializer_opt - ClassElementName: + ClassElementName : PrivateName - PrivateName: + PrivateName : # IdentifierName + template: productions features: [class-fields-private] ---*/ @@ -23,14 +24,14 @@ features: [class-fields-private] //- fields #x; #y //- privateinspectionfunctions - x() { - this.#x = 42; - return this.#x; - } - y() { - this.#y = 43; - return this.#y; - } +x() { + this.#x = 42; + return this.#x; +} +y() { + this.#y = 43; + return this.#y; +} //- assertions // Test the private fields do not appear as properties before set to value diff --git a/src/class-fields/productions/cls-decl-after-same-line-async-gen.template b/src/class-fields/productions/cls-decl-after-same-line-async-gen.template index 7f6370a8f9..86112b8c1b 100644 --- a/src/class-fields/productions/cls-decl-after-same-line-async-gen.template +++ b/src/class-fields/productions/cls-decl-after-same-line-async-gen.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] class C { async *m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-after-same-line-async-method.template b/src/class-fields/productions/cls-decl-after-same-line-async-method.template index 3f27b16f39..0c2e40f9c6 100644 --- a/src/class-fields/productions/cls-decl-after-same-line-async-method.template +++ b/src/class-fields/productions/cls-decl-after-same-line-async-method.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] class C { async m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-after-same-line-gen.template b/src/class-fields/productions/cls-decl-after-same-line-gen.template index 685e9a932c..386fa7a550 100644 --- a/src/class-fields/productions/cls-decl-after-same-line-gen.template +++ b/src/class-fields/productions/cls-decl-after-same-line-gen.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] class C { *m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-after-same-line-method.template b/src/class-fields/productions/cls-decl-after-same-line-method.template index 03c468685b..c7716e45a5 100644 --- a/src/class-fields/productions/cls-decl-after-same-line-method.template +++ b/src/class-fields/productions/cls-decl-after-same-line-method.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] class C { m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template b/src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template index 4e9a9bbe9b..5f2527b231 100644 --- a/src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +++ b/src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] class C { static async *m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-after-same-line-static-async-method.template b/src/class-fields/productions/cls-decl-after-same-line-static-async-method.template index df3ff3aca1..78d5c7ad6f 100644 --- a/src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +++ b/src/class-fields/productions/cls-decl-after-same-line-static-async-method.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] class C { static async m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-after-same-line-static-gen.template b/src/class-fields/productions/cls-decl-after-same-line-static-gen.template index 68e5251f0d..0796e403bb 100644 --- a/src/class-fields/productions/cls-decl-after-same-line-static-gen.template +++ b/src/class-fields/productions/cls-decl-after-same-line-static-gen.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] class C { static *m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-after-same-line-static-method.template b/src/class-fields/productions/cls-decl-after-same-line-static-method.template index cce75d1726..a55ceddf84 100644 --- a/src/class-fields/productions/cls-decl-after-same-line-static-method.template +++ b/src/class-fields/productions/cls-decl-after-same-line-static-method.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] class C { static m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-multiple-definitions.template b/src/class-fields/productions/cls-decl-multiple-definitions.template index a64f7bc539..ea28963573 100644 --- a/src/class-fields/productions/cls-decl-multiple-definitions.template +++ b/src/class-fields/productions/cls-decl-multiple-definitions.template @@ -15,7 +15,7 @@ class C { /*{ fields }*/ m2() { return 39 } bar = "barbaz"; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-multiple-stacked-definitions.template b/src/class-fields/productions/cls-decl-multiple-stacked-definitions.template index e65c65475c..5f86b161c3 100644 --- a/src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +++ b/src/class-fields/productions/cls-decl-multiple-stacked-definitions.template @@ -13,7 +13,7 @@ class C { /*{ fields }*/ foo = "foobar" bar = "barbaz"; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-new-no-sc-line-method.template b/src/class-fields/productions/cls-decl-new-no-sc-line-method.template index bc7bedf155..e27900a084 100644 --- a/src/class-fields/productions/cls-decl-new-no-sc-line-method.template +++ b/src/class-fields/productions/cls-decl-new-no-sc-line-method.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] class C { /*{ fields }*/ m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-new-sc-line-generator.template b/src/class-fields/productions/cls-decl-new-sc-line-generator.template index 3ae2f7ebaa..385d8cadde 100644 --- a/src/class-fields/productions/cls-decl-new-sc-line-generator.template +++ b/src/class-fields/productions/cls-decl-new-sc-line-generator.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] class C { /*{ fields }*/; *m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-new-sc-line-method.template b/src/class-fields/productions/cls-decl-new-sc-line-method.template index 1bdd2ab6f7..fa55454f3f 100644 --- a/src/class-fields/productions/cls-decl-new-sc-line-method.template +++ b/src/class-fields/productions/cls-decl-new-sc-line-method.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] class C { /*{ fields }*/; m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-regular-definitions.template b/src/class-fields/productions/cls-decl-regular-definitions.template index 870e20b98b..5bb2f23b26 100644 --- a/src/class-fields/productions/cls-decl-regular-definitions.template +++ b/src/class-fields/productions/cls-decl-regular-definitions.template @@ -10,7 +10,7 @@ esid: prod-FieldDefinition class C { /*{ fields }*/ -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-same-line-generator.template b/src/class-fields/productions/cls-decl-same-line-generator.template index 467e259d84..0fa5df7f09 100644 --- a/src/class-fields/productions/cls-decl-same-line-generator.template +++ b/src/class-fields/productions/cls-decl-same-line-generator.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] class C { /*{ fields }*/; *m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-same-line-method.template b/src/class-fields/productions/cls-decl-same-line-method.template index 7b1bd68cec..6974a01f70 100644 --- a/src/class-fields/productions/cls-decl-same-line-method.template +++ b/src/class-fields/productions/cls-decl-same-line-method.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] class C { /*{ fields }*/; m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-decl-wrapped-in-sc.template b/src/class-fields/productions/cls-decl-wrapped-in-sc.template index ccccf51d79..2f6db155a4 100644 --- a/src/class-fields/productions/cls-decl-wrapped-in-sc.template +++ b/src/class-fields/productions/cls-decl-wrapped-in-sc.template @@ -12,7 +12,7 @@ class C { ;;;; ;;;;;;/*{ fields }*/;;;;;;; ;;;; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-after-same-line-async-gen.template b/src/class-fields/productions/cls-expr-after-same-line-async-gen.template index 410d8abd6d..ce74f1e488 100644 --- a/src/class-fields/productions/cls-expr-after-same-line-async-gen.template +++ b/src/class-fields/productions/cls-expr-after-same-line-async-gen.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] var C = class { async *m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-after-same-line-async-method.template b/src/class-fields/productions/cls-expr-after-same-line-async-method.template index 60b81cb597..5159fb2431 100644 --- a/src/class-fields/productions/cls-expr-after-same-line-async-method.template +++ b/src/class-fields/productions/cls-expr-after-same-line-async-method.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] var C = class { async m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-after-same-line-gen.template b/src/class-fields/productions/cls-expr-after-same-line-gen.template index 8231e3eea4..5cfdedecf0 100644 --- a/src/class-fields/productions/cls-expr-after-same-line-gen.template +++ b/src/class-fields/productions/cls-expr-after-same-line-gen.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] var C = class { *m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-after-same-line-method.template b/src/class-fields/productions/cls-expr-after-same-line-method.template index 5ea97ad696..c89fda4dd4 100644 --- a/src/class-fields/productions/cls-expr-after-same-line-method.template +++ b/src/class-fields/productions/cls-expr-after-same-line-method.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] var C = class { m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template b/src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template index 26df25c717..0a1cb27869 100644 --- a/src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +++ b/src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] var C = class { static async *m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-after-same-line-static-async-method.template b/src/class-fields/productions/cls-expr-after-same-line-static-async-method.template index 84dad39280..ff00a66a60 100644 --- a/src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +++ b/src/class-fields/productions/cls-expr-after-same-line-static-async-method.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] var C = class { static async m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-after-same-line-static-gen.template b/src/class-fields/productions/cls-expr-after-same-line-static-gen.template index 9d9c314705..2281b3bc79 100644 --- a/src/class-fields/productions/cls-expr-after-same-line-static-gen.template +++ b/src/class-fields/productions/cls-expr-after-same-line-static-gen.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] var C = class { static *m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-after-same-line-static-method.template b/src/class-fields/productions/cls-expr-after-same-line-static-method.template index 922c449ffa..aa21b2ec29 100644 --- a/src/class-fields/productions/cls-expr-after-same-line-static-method.template +++ b/src/class-fields/productions/cls-expr-after-same-line-static-method.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] var C = class { static m() { return 42; } /*{ fields }*/; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-multiple-definitions.template b/src/class-fields/productions/cls-expr-multiple-definitions.template index c94b5255da..d98b741b84 100644 --- a/src/class-fields/productions/cls-expr-multiple-definitions.template +++ b/src/class-fields/productions/cls-expr-multiple-definitions.template @@ -15,7 +15,7 @@ var C = class { /*{ fields }*/ m2() { return 39 } bar = "barbaz"; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-multiple-stacked-definitions.template b/src/class-fields/productions/cls-expr-multiple-stacked-definitions.template index 8184c88058..cbb6f73300 100644 --- a/src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +++ b/src/class-fields/productions/cls-expr-multiple-stacked-definitions.template @@ -13,7 +13,7 @@ var C = class { /*{ fields }*/ foo = "foobar" bar = "barbaz"; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-new-no-sc-line-method.template b/src/class-fields/productions/cls-expr-new-no-sc-line-method.template index f0269c0f42..5755b501d0 100644 --- a/src/class-fields/productions/cls-expr-new-no-sc-line-method.template +++ b/src/class-fields/productions/cls-expr-new-no-sc-line-method.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] var C = class { /*{ fields }*/ m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-new-sc-line-generator.template b/src/class-fields/productions/cls-expr-new-sc-line-generator.template index 34d080e3fc..0ab3f55e44 100644 --- a/src/class-fields/productions/cls-expr-new-sc-line-generator.template +++ b/src/class-fields/productions/cls-expr-new-sc-line-generator.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] var C = class { /*{ fields }*/; *m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-new-sc-line-method.template b/src/class-fields/productions/cls-expr-new-sc-line-method.template index e604e4ee62..b0ae70949b 100644 --- a/src/class-fields/productions/cls-expr-new-sc-line-method.template +++ b/src/class-fields/productions/cls-expr-new-sc-line-method.template @@ -12,7 +12,7 @@ includes: [propertyHelper.js] var C = class { /*{ fields }*/; m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-regular-definitions.template b/src/class-fields/productions/cls-expr-regular-definitions.template index 3f1665d002..08a36b51cb 100644 --- a/src/class-fields/productions/cls-expr-regular-definitions.template +++ b/src/class-fields/productions/cls-expr-regular-definitions.template @@ -10,7 +10,7 @@ esid: prod-FieldDefinition var C = class { /*{ fields }*/ -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-same-line-generator.template b/src/class-fields/productions/cls-expr-same-line-generator.template index ca1fcdc8bc..b69692d68e 100644 --- a/src/class-fields/productions/cls-expr-same-line-generator.template +++ b/src/class-fields/productions/cls-expr-same-line-generator.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] var C = class { /*{ fields }*/; *m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-same-line-method.template b/src/class-fields/productions/cls-expr-same-line-method.template index 78eee3d869..7d40e6d65b 100644 --- a/src/class-fields/productions/cls-expr-same-line-method.template +++ b/src/class-fields/productions/cls-expr-same-line-method.template @@ -11,7 +11,7 @@ includes: [propertyHelper.js] var C = class { /*{ fields }*/; m() { return 42; } -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/productions/cls-expr-wrapped-in-sc.template b/src/class-fields/productions/cls-expr-wrapped-in-sc.template index ff2780e2b2..c90df3c17a 100644 --- a/src/class-fields/productions/cls-expr-wrapped-in-sc.template +++ b/src/class-fields/productions/cls-expr-wrapped-in-sc.template @@ -12,7 +12,7 @@ var C = class { ;;;; ;;;;;;/*{ fields }*/;;;;;;; ;;;; -/*{ privateinspectionfunctions }*/ + /*{ privateinspectionfunctions }*/ } var c = new C(); diff --git a/src/class-fields/static-private-fields.case b/src/class-fields/static-private-fields.case index 47e795e75f..633046576b 100644 --- a/src/class-fields/static-private-fields.case +++ b/src/class-fields/static-private-fields.case @@ -2,34 +2,36 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -desc: literal private names +desc: static private fields info: | - ClassElement: + ClassElement : ... static FieldDefinition ; - FieldDefinition: + FieldDefinition : ClassElementName Initializer_opt - ClassElementName: + ClassElementName : PrivateName - PrivateName: + PrivateName : # IdentifierName -template: default + +template: productions +features: [class-static-fields-private] ---*/ //- fields static #x; static #y //- privateinspectionfunctions - static x() { - this.#x = 42; - return this.#x; - } - static y() { - this.#y = 43; - return this.#y; - } +static x() { + this.#x = 42; + return this.#x; +} +static y() { + this.#y = 43; + return this.#y; +} //- assertions // Test the private fields do not appear as properties before set to value diff --git a/src/class-fields/static-private-methods.case b/src/class-fields/static-private-methods.case index 9675c9d8af..50b6565f24 100644 --- a/src/class-fields/static-private-methods.case +++ b/src/class-fields/static-private-methods.case @@ -2,43 +2,42 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -desc: literal private names +desc: static private methods info: | - ClassElement: + ClassElement : ... static FieldDefinition ; - FieldDefinition: + FieldDefinition : ClassElementName Initializer_opt - ClassElementName: + ClassElementName : PrivateName - PrivateName: + PrivateName : # IdentifierName -template: default +template: productions features: [class-static-methods-private] ---*/ //- fields static #xVal; static #yVal //- privateinspectionfunctions - static #x(value) { - this.#xVal = value; - return this.#xVal; - } - static #y(value) { - this.#y = value; - return this.#yVal; - } - static x() { - return this.#x(42); - } - static y() { - return this.#y(43); - } - +static #x(value) { + this.#xVal = value; + return this.#xVal; +} +static #y(value) { + this.#y = value; + return this.#yVal; +} +static x() { + return this.#x(42); +} +static y() { + return this.#y(43); +} //- assertions // Test the private methods do not appear as properties before set to value -- GitLab