diff --git a/test/language/expressions/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index abc30af89ff20212c2bf13eadc785c80cd1483aa..31fbd9c02751015a2573f4515a8c76b004605f0b 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier-initializer.js index 4c9cb383867197dc59ee045c6f842a22a1c137a6..e9fe1af2228b60f0acde833e7ec27f8ba4faaa2e 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier.js index f4cd4bdd9e7442958056258d7e990d7710924e1d..7ecdcd869eca0bfddc11d30e9196764222299d58 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js index a75596b0d0911924c7eeabc1da9565a7e7bbaec7..10bbfa7f638c2379615c9b786e313fdf5400f87c 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js index 17896a22bd8b11ba8b746969cf168fc2415615e6..7e4a049c7af8fed9f734563fc9cdefbbba0e99a7 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js index c0ee0b49248057a2ec33bdf88bafd76a0f1b1273..20e88310ce6da998ab0546fe8c90767dca327464 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier.js index fafb30e5eab8e940edeb50029563d3e2aa66169f..80a7dfe4f015045a6aa329d6d12b741d0ba5df27 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..fc911d03205553a626719a0dc0c3f500571a0d65 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..3963332d193f467d405b161903014fd77b863912 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..045a3015adabc77ba174b2d32e0420027cabc620 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..dc66bc6b8bdfe9e83a0d57b1addd62a0e99eaeb9 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..b476ac548a1efd0ca7f8e53aa00a933a837f9058 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..04f3dda18fe50c4de2e874002d551463e3434396 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js index e3c927ecaa19710ce8f25512f8960d2be7ecef08..7372e4720d5b2ef877e09471d4d81c659c6e20a4 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { *m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js index f583254b5b60174291d889e687e192d58ae844df..7b45208a11a506e7155995e8b762c1032355b5be 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..ada5b052213fd9242721923e45ef7df84ca817f8 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js index 46d1a107a4098bac1c32cd9d7ef3a724beb2954a..f7865d1028a363c978a32e511b52586fd1f96ebc 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..43163c6667395e86121e66a089b9b25703fda45f --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..8d08251ed4bf807fefa34493e6906f4849994063 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js index cb66f59c8ae1395de53ede6a94f4e19a28d0fc96..e9bf4282374b26151b1f4db8ba2d9bac96e8b9ea 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js index 9cf2145b031373d7a23b6752deccd075dcc7fc3f..2ce79ee705b7a883e861ac564179c058e77edc9f 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier.js index 18aa8bd97931ab12f4722c2e1365e6224a65af63..db577ad23008b023afbb15c7b5113e0bf51c7dbe 100644 --- a/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 7dec72eaa0d9ec3936dc249e47a0b53e34238be7..bf74279e57f699ee11ad07f6fb55c1a944bc2366 100644 --- a/test/language/expressions/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier-initializer.js index 0a0fdebfdc0329a10dc71cea0a4e750afda05ebd..574a373ae2585e9caa345c26bc1d244bab1ee0bd 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier.js index 89cd17b992bdd06e82d2d4c93e13c475fa586068..a3705642c36c3ca1fe414db79b20807b9fde832e 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-alt.js index b5ea3953f9db01c26face8a7b8f0ee18f6af10ca..600cd311cf46e6f5664775dd96a29d4afb527007 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js index 8c11ae416041997d177d1e6cebc44295d328a9f8..4d3fc6792971a19637eb998dcc51b3ea7c116304 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js index ee9058804f7c89324ddc27c885a99754b7411e95..54a9e1ad1d0ae0f4338c15d7a871829eb1dca21e 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier.js index b8985cd3b4a38295954193371bb0c56a94680ddc..8adb68dffc46c59b882390341bbd640fd32dc83c 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..252484c0adfec1997b39785085805d261cebb08f --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..e21b8a4dd595ad65140fa17dab93ed8d5cc71282 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..40e7f5f105ca1588b2b29eefed5562b374dc34fa --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..266dc9bc8896d33ae547a2539dee68c3a818f1ca --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..fa9c6081c54bac1dd965e29008584c8cd2da3741 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..fd80b633561dd48ba33367f428ea88d578aeee99 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js index a450a689d0d257e404f4692f7945c8487ec73bcf..e076c3c26fe1b42549b235f03823ee3b5da00509 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js index 5b005016458f23598455fc9ad4a6233687f5d3da..6c97cb9e261951d3af8b7d58c3018739804af24f 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..15f3cce394ecde4c5efd36071af22a4a39f622c7 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js index 57b8d679a39c8d4307b89d958787b23a236c08da..dc58f24424d68091a4b0ab822c5a402c079743ee 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..341e50116cd9a229079e7b97a5b931b7360d9837 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..5283ca0b9b665c76b7289166f8ef609baccb48fd --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js index 398218314bd7461bade5875bd2e225097d6074b7..50ca931e6e68a18ad5b6d60062fdd90fb5df582e 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js index ca2286d78f65b121cb7957f3b968d4f9647cdc73..2267dd4427eea4f45703b8b8212cbc85dcf0b054 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier.js index 172bc77851e57fffcecb3749da703d8d148cc2b6..0393b7b011d463c66f8f3da782e55a686805a447 100644 --- a/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js index 3fac03c1e52710dff87828b4851efd15a1fa3292..ec7fbec04ce6a867eb2ba425b77e5f37255cf555 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js index ebdad02016f698a6b59a5c8ca932f6261f1fe04c..87bb10775fe875722ab9550f1538144f66956043 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier.js index 5d6cc1dede276bddf31c66f99fe70cd1cf247942..cdf3f000f7c49a76a29e84fb2c9966adf40a76c6 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js index 9bceb8ad1ff45658507ad665a75290780cd4db11..bf0b03b253a135f4170addb25be3f5c8619666ee 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js index 43143675db4cd90435899b7c0746f03a3e9b0ef9..718948e0781eded7f6f013ee14d10505f79de3dd 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js index 8e3a001a3ddf9f395ec1106ccc2a4e757b8426a2..9a45f465ed81bd28513c751b62c42317667ea20e 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js index c8e9e4a152bd9b665540178063042923e7e159f9..f1693b695e64500e2b337c0d5b7f2337600bfe74 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..84e248f8a4c4036a072c783e10425298df27b121 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..fa4f68e1b7a5702539c70b3b8e54091ba0362cac --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..cd4791232b3435c14329fc3356719e7762f2918b --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..d4209a9fd3d47d04a586fd15362f4954acaba307 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..98728988043da90fd8d535b11211b2d0cc3db1aa --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..cca95d074c254aa1cea2b81a5c0dc0ffe5e12e75 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,125 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js index c3adc2883aa982099963789a7b46dab5648d72ce..8c1b3ec4ae170f71301afdf4bd3a4a8d0ba5241f 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static async *m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js index 2e339ebfe324e7f16806ed64ca7c3280a034284d..3367d390f4229aefc5b8e13c464ba58b2cc1a514 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..41b6ead3f01edbd2a0c5c072442fb61da0b39115 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js index cefca0895d1a0020b7e681aae78a7e09faeb0a3a..fae74f1829f2ebf3c89d419130e3af5da7687fdf 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..a646301450100bba967884d00f8f05be91828a56 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..09fce367344ba3bba87a9e7b4e130b9c3e6a2029 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,104 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js index cf52bf9422037a4e659c10a9a03d0485016b1aca..c35ef2e3ca44ff127d8b85b541295e1ab6a16acf 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js index 650296ac2bbd2ee60a6450c8f08c34634d87c9f4..b3bae16d2727153200816bcbf323881ceee4ff3e 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js index 6f82a68b6aa1d787f783abd83e6f3274514188ec..c898059164efec267d3e412bb2cec73b262da86e 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js index a124cb4b3412fa9574109838b1eae424cc190084..5e932402aef61b5b3187454a0821a2b846bb4b00 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js index 6ab83cfbd0656d24326aeb926b84df99bb2552bb..cc3a4aef07acfae70a2f65b36190bc3755ce151c 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier.js index 1913470f62d9aa578be2686cb767dc256f89fa15..6a6270a4785434c6938d9f3e7f4253b57080b59b 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js index c319e0f2e9f269b38dc3a207b5b6e3cd045eeac9..df53d38f9963fc2cbcfad477e01b69c0fd17b6ae 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js index 27b99bc8320187ce84959f1e71397f0b8abb3772..950a23d17ac63bf2b462306e8f90e69b841b80b3 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js index b8e4f8304ece8448d18f119e5a4034407b9997df..2a734e15f6887bff66d344062eef267a9fed6018 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js index ce08f2550732be7384dff0828e229f7c37e00b41..2aeb93b8c839ea3671ed87d355aa2b5639e56893 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..a1ebbc4c7a64c8dc7802ccd9831ab1811c8fc786 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f0628386780c8d092c628be39642e21a481e51e6 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..3d80577fa5d43bd0aaa6ef941558ec62f46b02d6 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..842b65e3b8d45ccd8720befb50fe2a98369a6810 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..02ed3506618ceec8f58b4a127168d657405304f6 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..194dc3d999febc75ff512d6117d060f356044a61 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js index 3393a2553db2385df60c16502188cb53bbca0ab1..018063c0e93754df808a37e81b96655b58fe3eeb 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static async m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js index 946645e069f4c65b7ca5e19dc10542dd167094f6..a0124ed6dc5a711bc4f4cecd4caf4a2087a0929d 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..d121c084598e6c4db535f580f1cabcb09433d5ed --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js index 413a1fc6f0ffca65d9b4521eb56728144a3d9118..bb4679d89ffbfd7ff262b4809bb2545c71078eba 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..1460024a08ba900fe8561ceb93f842d94feca4a6 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..f1ce0e6a3b649c2157b9e209019e786d09a082d9 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,103 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js index dd25aee729f7aadd4b92ad4837301951b5d66ae4..741cc639d6a7a3f8b7b6fe215599ddd118894827 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js index 5f1325890023de3be1c53988834416d1cead7c27..ee6fedcc0d44852e9aa36426b8319a24957c2a08 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js index a40dcffc3973775eea0afd12558de35250f5317e..ee079a906d69ec6213c362f41d86db04d60c21b0 100644 --- a/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js index a3985c5b61e10d60c5b3afbe1f8d5dedb165775d..e1474b254c0d08e6253f6543fe513783583c221c 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js index 1af61bd812d808bac6ad3bb4cf38b20cb6e47e81..2a1569c49c2f5cbd3f69cd76991628ed1272258c 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier.js index 3c8431712eb3a7da8b2bb71ce444947debdc3f9d..4f2b126cae2abe63b8eb85f1f58bde7238a9e435 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js index ce0b449d920c8d6d3645aac63eb9a1c59a6be236..1e1df640c4cd0f60ea77f0873360ab883e6700b3 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js index 0ce52d94e590f7fe81e2ad2a9960c66143f119e3..050b4e1a163edbfff866e6dcf30ba3dc9745c139 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js index 3134c688511f5e8012d29864ba7ff6d56ae0a80f..1b94d1d3e17dff3790f05449c1f89a8534b1eee8 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier.js index af70e7e9291fc7dac2b66268a576aa5489624ce4..3e061acfc961ce5f1c1a6400141e93b90b9b5b37 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..7ed3135c5e212610db6e6087a7a314ba2aba7a43 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..6f0571f81cfa41dc526851e7051494efde774cb2 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..6b3b70942a8a6025956d8d0254415d1bebc2cd3b --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..86413985cc55374ccbad15fcc90243ec5fdeb82f --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..67e21fb3f73d75d4d88c6f0d4d5ccf495f3c4cae --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..fd57c93431727f69a6c4be5e1ba79a2b01d8d570 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js index f282f026aa897314c62378129ffcf71eea5ea14c..60c3dba7c929b4d9e1aab452ef4dd30a7506e420 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static *m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js index b82b9c010588ab6da1ba0727addcf240c3f11e52..47e506ababccfc7c9cb4e3d9afb5ca759b3c3538 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..741df420b9fd496cd68cc0e4425a58aad635d68b --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js index f28b29fb0a35a3f500fb0d37141902ee750ef567..f6e47583c3e7971a28b76d774a773c8d72ab2245 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..741064eb744c86515ed217ec32762634bc5851ac --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..c90867a1875b34a01aad03727411f489de9973e5 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js index dbc6e893cc96656b51493f569d549e2ec1eaaa7c..09254197c0429f1c76943de60cfab36f0dffe835 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js index d8849231f61f3894b5fb8a9848d4a53badc1ea14..985e942aa72af40b018af01260f4f5cbc55c05ed 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js index 0e240f1e59a84f4eecc4633fff25c6448e189864..927769ff8a8974d1457af2aab068338189a7df26 100644 --- a/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js index c9d3d3aa49ad5ee49ddd3d6f95bf2098e3ffe5d0..241fbbac17ea487830c62b981cd9a2b6b173c4a0 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js index 6a2095badb60113bf6bee2f1c8128cfd3093cbb0..077e2611e77a7977538eb155063961fa55841b6b 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier.js index 136b3c42f9751d38afbd5d668c6b1c097c8dcd9e..226bcfa0b652eaa7646833ee4a7ddc21f73ae241 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js index 79caa36ce4f19c725e72afd648cbed5a6ff44f8e..5432fe04a6f4c8b590274f1523b92d2a52494698 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js index c94c0151add44ce6c8d9ff4fbcb7770ac29a3380..b13268cab7319eec6ab58e4d98f6bfaafe136488 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js index d22e8901013d1b5be135170955e591a4df306b0d..c15f65b15892e6ab534a34a881fcfc5acdf05a61 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier.js index 60c062b25bd9b272fc143a34b46510f90b1df238..c264e12bc9eb6830e87f44edbb845612137f1188 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..8b81ed9948f22b34f809db63ede9c510abbe2a32 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..dba6451cf2ae7a62bf5dffb86c445d83058e4195 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..24468330354310d02609e1fa16d8b76cd77a070a --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..661c1e1f6c5e67b1f448bbdb3f32afe60df7bff4 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..8ea5bb1746fd353c481c000ab6644ec7792e5ce7 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f1ce1992d45893ecdd2806c059e3f3bc0d075755 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js index 4190a189f995d07b79b23a37b3856a9c6e5c6c85..cfe752d237160fafc4bebe4c5b0819fe249e272c 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js index 0195586210b96d71d845b64f87f773e9810bf493..cb14eea43e477c58f5457ee497629551a0104367 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..803cfa2ae4ff05c09cc9c9b4ede65a38553421c9 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js index b2e00cc339f3be154ecea3dc4e0de73398358db7..d29955a673942ff70851a46084a25e16ba92271d 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..254e3236cecfb0461b457bf787c33eb90c2d9c97 --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..c863d36b407e9f3f6aba4f69b0d17bcce5fe86de --- /dev/null +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js index 69b632cd700ac57f40271989be07a35e89c3bbd7..3e4d054b9921e5a1462300fad80fd3b49f1dc008 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js index 2e22625d0684da4ba2237d63332c22c1ed8feb80..6258c9eb357d898c2a31fd676a967e46fd018ac4 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js index 1dded9c225db2802c600ab2799833329d52c0522..e763c6920cbb54346fc870b8cab3d6ecafa1c032 100644 --- a/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-computed-name-propname-constructor.js b/test/language/expressions/class/fields-computed-name-propname-constructor.js deleted file mode 100644 index 0050e3a7e58505d72435f6ab308e2c052ac5f59e..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-computed-name-propname-constructor.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2017 Valerie Young. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -description: class fields forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -info: | - Static Semantics: PropName - ... - ComputedPropertyName : [ AssignmentExpression ] - Return empty. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : FieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "constructor". - - -negative: - phase: parse - type: SyntaxError - ----*/ - -throw "Test262: This statement should not be evaluated."; - -var x = "constructor"; -var C = class { - [x]; -}; diff --git a/test/language/expressions/class/fields-computed-name-static-propname-constructor.js b/test/language/expressions/class/fields-computed-name-static-propname-constructor.js deleted file mode 100644 index 748e3fb53f3ba2c8b9abd08aeff9e63c6b298a2a..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/fields-computed-name-static-propname-constructor.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2017 Valerie Young. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -description: static class field forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value) -esid: sec-class-definitions-static-semantics-early-errors -features: [class, class-fields-public] -info: | - Static Semantics: PropName - ... - ComputedPropertyName : [ AssignmentExpression ] - Return empty. - - - // This test file tests the following early error: - Static Semantics: Early Errors - - ClassElement : static FieldDefinition; - It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". - -negative: - phase: parse - type: SyntaxError - ----*/ - -throw "Test262: This statement should not be evaluated."; - -var x = "constructor"; -var C = class { - static [x]; -}; diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js index dd380aacfe952db0d9bb48cb24ee31b6c22672dc..1b897d8fcfa17e288584f9ef3338b049e7222f38 100644 --- a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js @@ -16,7 +16,7 @@ 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/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js index e7a2fde56908f39819ba2a90350becc964ac1a19..1899fdc30bd02127a444bb49ce03f2d1d6e7ab97 100644 --- a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js @@ -9,7 +9,7 @@ flags: [generated] 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/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js index e518d465386b18fcd261e4a280be2e9870aef9ff..f45e7629afc471778ed7c8bf03b6182f44de2a79 100644 --- a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js @@ -16,7 +16,7 @@ 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/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js index c7954bc69cf0e0d4210a9f73e7b89678e637558b..4471caaecd11f3837dd88694b0c05f53097a9aa4 100644 --- a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js index a9c97fe8cd58413e6fc8a84598aac186d3904f18..b707c1f8af3c3cda5a6c2ecf4a3abec782817792 100644 --- a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js @@ -16,7 +16,7 @@ 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/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js index c983e887ce8a51681973e0d6f4fbc4150ec2ae7a..ec42afd792677b42c35c3dc5d4422dad03f0f4f6 100644 --- a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js @@ -9,7 +9,7 @@ flags: [generated] 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/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js index 44bb95f62f2f7ac8f7967b070d7b79dba7ef4c95..b41c09f2cad282a1c7eafa350409ae003ad7570c 100644 --- a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js @@ -16,7 +16,7 @@ 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/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js index 9878a14a926ef517eb5cdaff3864b6c2f1a7f10e..0c362d3483b914833270bd57f2a587002a20dfb9 100644 --- a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/expressions/class/fields-direct-eval-err-contains-newtarget.js b/test/language/expressions/class/fields-direct-eval-err-contains-newtarget.js index 9422ebd0060f8aa0f9b571bc8f63e293a0aca168..45319d97c0f13c045e54d0db2e73c60ec29b1e8b 100644 --- a/test/language/expressions/class/fields-direct-eval-err-contains-newtarget.js +++ b/test/language/expressions/class/fields-direct-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/expressions/class/fields-indirect-eval-err-contains-newtarget.js b/test/language/expressions/class/fields-indirect-eval-err-contains-newtarget.js index e0080086715cd6a1d0b23dc9e0061b6c1c742e2a..5be82598acfe5097f58de0c73b0ad327fd86ab8f 100644 --- a/test/language/expressions/class/fields-indirect-eval-err-contains-newtarget.js +++ b/test/language/expressions/class/fields-indirect-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/expressions/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js index 0712be6cc61e208ee12604f4ee30fb32af204e52..5f28bba1973d8af761340141887002b46b775817 100644 --- a/test/language/expressions/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier-initializer.js index 632c8c119bce6e4ae1b49f4116af71c3a7ac1e67..ccb0922862563564da27686154782634eae3629b 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier.js index 93f5643f5ade30b282aaf0b0caa4f0366642a801..2182bd8c07fbf550b8e3961856fb501f022095cd 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-alt.js index 7052d732da7ec874b7c4fb7b2d7954b2cd12bb64..389100aaf3d0dbb25dcfa65ad4bf4d61dbe9f828 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js index 739ce1027a6ef6ebeb0c216cf460d9a141bbc364..114b919cc0b46085afcfc849cc3caf85ade6243b 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js index dcb8bd0091f6e50d33ed101d9421d41a4a80b964..150b9a9bee2aa78d77f7e98530344e8756890083 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier.js index 7f418d1f4c9903b163c653718cd4f756a6281fba..0a3111c0e1c8e8ed0b4a0a9b1448b7be4f719aae 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..5ccf01a63f5c44ee0ebde12ff15a6432a0460e65 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,167 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..4e45cd1f00f6430e78af3c9ee972238d66502455 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,168 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + m2() { return 39 } + bar = "barbaz"; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..4f6a69137c2291f752ee9341bbae964931e44668 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,167 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..c3b771c848f9d1afb3b01cc7f165e8897183a1a7 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,168 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..b72e78cfb09967ac7b56a761c2d26b212b96ebb1 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,156 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + } + m2() { return 39 } + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..4aa37a2528b943dd3b7e21608eb614879e61e122 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,157 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + m2() { return 39 } + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js index 8d63cb93eb02ebf51f4f55bb897367cbd0ae296b..aad1574fd9605670f53589880eeeb8381a4e08ee 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple fields definitions) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -61,27 +61,21 @@ var C = class { foo = "foobar"; m() { return 42 } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; } m2() { return 39 } diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js index 1cd184c5c77337910390129d8274625ce3445d16..3beabd3caf26f0bc25960119e5c8debfd2ecb665 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple fields definitions) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..e76fe2194a67a6ff70a3d3690f964bf67cdc96f3 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,142 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J + m2() { return 39 } + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js index b3a0eb1889e2fe748d7098b7003c7751a490f7f6..a4aecf0902c1b4cca27eafe27925796b272e612f 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..7d0d6a5357a1ba422f34362bd5f87030bfa79dd6 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,142 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + m2() { return 39 } + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..b42dede64cf11cae206d66e3aa9fac4476c9a7b0 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + foo = "foobar"; + m() { return 42 } + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1 + m2() { return 39 } + bar = "barbaz"; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js index 6839f876e95973899950ad56830a66987e912cb7..a60032da2509426871b68bb0e373df5937d03c43 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js index 0c388f39824bbabb4d47e63db0076036c09dce08..d8a7f0138c26ba3517c1b18857d0d9baa42fc9d7 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier.js index 644647bd0db4af646e985d0d36c12bc6e1a5f066..ec05e80b35b8946d56b8a46c07d9ba2516946fce 100644 --- a/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-definitions-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js index f555657293755a1ba78b38dc6314ab0304d5c16e..cffbc53894bc5b6e3c9f99e59142712c328862cf 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js index 0ebd53481d2e7fd467099054bf82e31f31956d6b..23e0f2edae73e635657a830d81e407611663dc84 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier.js index bbf70435d5fba8352369fb532b266b2a7e8a8046..116c52371f81ab09d95d6be846b17e3ec4507c1e 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js index 602aa8cd561afa9e37c66299d302596c7b4836ed..5185db4a4443da26828e69eaecd4b50082362f0a 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js index 0e6bdc88f52ca0bd971c3f30c2962b9ed17579b6..5b621643b5476e8a14ec7dc68d6001198d31375d 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js index 803bdbe03bdc528bfe68ce4a811220b3effda4d5..d1f771e422ffa4a4ccf777c1cf8a9603e9ae8a55 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js index e28f81ae7b6235ee191e3e1ccdd7bf841a442d9f..ead0cae70f4e31d015ac39aa7c5e226ef5719e88 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..779ab2384bc4ba7be49836bd4a10b19b59c0930c --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,145 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..8960c89dfb0638fcc94ae8091be5be5b2e8a2a82 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,146 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + foo = "foobar" + bar = "barbaz"; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..b8b3896d66123d66c8b1e52bdd1b6af701f79e96 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,145 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..76f37810d3e6b57197e39bb27d0afe5fc192280a --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,146 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..4840c98d9733aa802e816939d7773fc14398ebde --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + } + foo = "foobar" + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..d1ef00fc021d3daab0e60cc1f24d30d05935285c --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + foo = "foobar" + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js index 385f8bd798913c0b7cdcb948a5cc0301bf2614e0..2981baa14ee69f5ad8dda3eb51e2b0e3b406d5e5 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; } foo = "foobar" diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js index f2cd4be40274f13aa031f7070d95108f828570b9..496767613f2b5c6601ba631f0dfcd1c27386553f 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..0e98462493e2f661ee22a45e7c48aa99605a3339 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J + foo = "foobar" + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js index e476161bd08792fad811ff6c0e804aa284947130..8e36a93a5cd5a1d34ca8bfab404d2ec48222f9f5 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..c51bd453f82de64df26dac09a54831fa55bf2a2b --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + foo = "foobar" + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..43f072b128b8eb9d956fa34a5c28441164dfcb57 --- /dev/null +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,114 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1 + foo = "foobar" + bar = "barbaz"; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js index ab1705896e4d73fa362a6ebec9fd6612ec123550..14655baa81f6e3cc31a222a087059b04cb3d33fe 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js index b8916c68b527e3d672a43e022a6cb05c459a0cf8..9c5cafff526da8c277c33df30f5ca226ffff7df4 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js index 7ece03a60ff41cca623a2c6df65c3d6c6ec7b66f..12a2ba04375ccfa51c137a838d94c082fc484703 100644 --- a/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js index d1379b96ba2b4a2c1bb9b511fb25481cf1096ab2..60b5762ad213548c01a08f08bbf6fdfc71e66abe 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js index 33368c972858f06bd5c8d5994e298b4352751ad3..2386702204d73d1dbfda369461f237e134b21d2b 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier.js index 038b2feb7637c4bddae126b9e3ab370706123e5c..0c4b4d39752271b8e7ff63bffee44a89ccc517be 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js index fa5056e23732b7cd20ab5d4008ffbdace113b2a5..156eba91d7fa7b4aab1c46c945c86c2ef5e55587 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js index 6a082a7b0c0a2de3ee67eaf1298ddefa5c89b053..b889bd1468ed8ec36496b643c6626c8f3a9e3bd6 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js index af503cae7062414e35644274b7ec59807727c85b..d819783d3865871100a9fbfa53b79d3bcfcdb1db 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier.js index f3d0cbb6986943e59a5b81209c4005786d3bdf75..11d90ac7a87db4c5faa48dfcd86b2c80fab0bbe2 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..042ffc25676b32d82087bb5b9710bf3816fd2c11 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + } + m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..76a4c887ec8ff4d27005989677f7e4505a0502ee --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..eab19a8ffd077769efe4ff42e0060c487167f5db --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + } + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f98fe88157057715b3db619be233890e47c89561 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..33950f9664bca373f3cbf411d449a1a98cec5867 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + } + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..ada54f015859193fcfa6dbcef57451a80ea372e8 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js index d6b0423dbb7f9caa6722898732ac0d826b1782b2..f53ddc736f5deb15a3f27ad887aedc9b32dca6d7 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; } m() { return 42; } diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js index 42383a312e2037a3285d307eca732bc23f9c50f8..315bf3efa5e50636f85f67e3a511b2c167337f41 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..5eb6aeea28e449c889817d07e20a94190f41352b --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js index 83e9e56b313319ce18c4fae90858a76cf2de5b0c..e1901a7d50ddfe72396e59850d72a785967977a6 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..e36a13345424f3c8ffb69acb0b72326271a14aca --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..39d8929c470110f0dec5e38298f892b632108786 --- /dev/null +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1 + m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js index aa5f913d2c6dea718863ee697db6a97f4548acd6..532d44b88b0c295323fde29c5a15eb32b24df6bc 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js index 28d9712a7e57cc0c9106139699f888ecc587aa0f..b03835cb9c29ede3a1c581aa3f2aef2d248aae35 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js index be24db224f2c9c84cb898912a23f332a6f94c677..b37c2092511ac77760d3fd633a4137c43d6aa4be 100644 --- a/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index ec6fa5ac2888280eaf00f9c2f7369caf1004ea01..61f85f900c120d6c1248eb8dc032cd1c218d8be7 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js index c20042d7b9cefbf65906d1e34de1e4c39c1b7505..2a90a47d8160f9fbbc4590c3d21aa17287043848 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier.js index 9d90b1932c401c8bf8d8e10c087730637dc1aae2..fd7fc0eaed45a5f9ba463eb9068f7dd0042101c5 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js index b3f83f12e284228ea2fa6c01b4b930830ec1930a..89efbc4d6d04c0b953e9326b4f4639bca2b3739b 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js index 5a7ed4f9d7d9c3685e2b25dc50b04a51ffdc20f5..3edc04ef266aa71eb96c0b1409f709c5d02ea091 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js index 131e92980259da3d97a5cefd6cb390f7e25f3f72..2bed89d3381086f2f914fd8f43c40f592d2d2f15 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier.js index 303faedec20c9ce75d02bbf605ac76d4fe7d23c7..615111f11b0847dbf5994df6f02f7cca82ed4cba 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..c4b9e371376ad3193154aaafd56ed990822e26b2 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + *m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..941da6fcbfd38c663883d81d1070d0dc5d5b20f0 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + *m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..d53e4a92168b790ca6768223f1e1949edb010591 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..ba7b86fe173bc570616a7799b291e853b99f24bf --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..d7a6c8ef22dd079f5d82c48f38a14853707ee232 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..154156c8e6798b7ceb6bc0a9abd72843dcf28678 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js index 34b6e8aad91f88848e4cec097536b9db3fab8740..da37a639cf6c9e20f5f31fd59f82bdcba3aa1128 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; *m() { return 42; } diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js index c35499141e9c6b014328356d56eb2fcd454bde3d..e0d1a96cc2e0521164b2e36126a877ff6795b269 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..6a4e753196d8298aa7ce011c97097618857f934b --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js index 79abd2b1d77fa24631fc7d39fab1a396b0d35f17..cb72dc839ca8b56ae65f362b190890b3a031191e 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..dcb5086e2b6c2e68fb81c8ed00a728963ebef28d --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..6caa6e15ec121d309000ebb8c8b3013ae472f7b4 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + *m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js index 56d10480f466637d989fea5bc415013806d7bc64..3d4ce691ff86e1c3bd3e0db644c53d5ee33f5be7 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js index 8d3616dbbbc0278194947ab1b6871a3a74bdac54..a2aecdf3018add4e43bc219c227337e6496cd1dc 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js index a51d2a0a70c4b243a78aec9e8f4cd65e6158a630..92421ec3b7c6469509c470aeb96b2228049095cc 100644 --- a/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 5c07c4cdb30b120456cadc1105a3148bef211ae3..94e7b8dab3d69b571ed8868a080c47b316e72c2d 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier-initializer.js index e643193c314784256a4f984e3150d0a60868b210..951beaa3930364aa2bbf318bfdd9bc79191f2362 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier.js index 0bf202d1f45c8799afd023b74a3c483cd83317ec..3d4b1884b870c6eace3f6ddd3197644b09494ab6 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js index 068dc85b68baca9904b2fc5e9be012c3c4ffec8a..19e1b4ad62a2ff7f2319b78256fbb2e86868ee39 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js index d0412816906bd2f2ac15c77bdc6c51aec0039fae..f3d0fcdd581c117ed2ef9f36af789b1950e55f0e 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js index a7b65c16189c0b20c90f666879b68d0ecd0bc6dc..5bce1573d333673e7bb4a00bf612470adcb016ef 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier.js index 3985fcc0216c71e83c9c84114a72f7a7a934d655..48f59120f1c340131ba345404a38436b00a2eeb6 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..89265d3fc27c5c2604e8d986ac9f932be78e1f08 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..616f3a3f7aca0d760faac47e2c23fdd413f05402 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..7990d7a4dc9fe3bccc33bf149be61185247f78a7 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f47bbd4519a8d5c79dc2ebfcef03fd007546817e --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..d3ec9ff36e56e5901c07ae0a11c521850a13650f --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..ad929a09c748fc2e96e33fd0b4d46d39ea1349a8 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js index d4806f6263a22fefa4c5627d117416737317ba56..e03bfbbb63a2421357734889cb3fcc6febcd6317 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; m() { return 42; } diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js index e1f09a5315758f92c9330dbdc3be910a972670ad..45555d4a19280308dc24d382994ee746b540c5db 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..f06b9a21d430678a89e8ea25aa239ae053ff8c81 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js index 3328f4b1527ab8f5ed632e04cf3a805d59e5383f..526c28b06579a8d55003f95666db398a3655db7a 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..b1979020b5c39e3cfcaf9d357bcef41953367cb5 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..fefd7689b02c34219033d2698a8f98080a56a4d2 --- /dev/null +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js index 362b98deac00cbbd301ce3db3fd4cfd15f4e2041..354d4abc3079702e158e1b59645170e56f8b8b2a 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js index ace5e03f92949f967c700bdaddff7d1ce1271000..5f9e79ab36bcd407d9405bdc088bce301492f026 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier.js index cc7d1938eb35a6941702b41003b714e39fd78b58..26d05e28f9e45b7e56991428019efa1ed7d403be 100644 --- a/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-new-sc-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-private-direct-eval-err-contains-newtarget.js b/test/language/expressions/class/fields-private-direct-eval-err-contains-newtarget.js index 2273bc4dfd67ad49dafbea8777a92798cb4825a9..4cff46aed7e2bd16352e94d63398c1dc04b62657 100644 --- a/test/language/expressions/class/fields-private-direct-eval-err-contains-newtarget.js +++ b/test/language/expressions/class/fields-private-direct-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/expressions/class/fields-private-indirect-eval-err-contains-newtarget.js b/test/language/expressions/class/fields-private-indirect-eval-err-contains-newtarget.js index 42e0f30ecf733096af165520d8244e0312f8fa16..54fdb2a8096d98e5d5f2351e24a73ae6e83ba553 100644 --- a/test/language/expressions/class/fields-private-indirect-eval-err-contains-newtarget.js +++ b/test/language/expressions/class/fields-private-indirect-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/expressions/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js index 041cfcc2e5c85139586ba00564f2c11ab457a481..27060a55a2f26e96d5ef5f37e0faebf168d9e94a 100644 --- a/test/language/expressions/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-regular-definitions-rs-field-identifier-initializer.js index 1e0e3cdde1e4526ee69034eb3c0c10fee462030c..66a45fb468147270928dbfa7d186d063bbb3df5c 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-field-identifier-initializer.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-field-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-field-identifier.js index ad9c241d8fa7e00cb8af0f3b6bed40036a5f09dc..8afe1f867b16d24aa514bc26d93c6606625415ec 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-field-identifier.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-field-identifier.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-alt.js index b02fcda1cd11abd1d41c0682e783f4f8404f994e..055469d5c4d4b03f080cb70b8b86380f6d565a25 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js index c73a77c87f8e01778ef4b615ca8bc52c8abf7393..c9ff8690fd4e89962614cb8d4b38b422d65edc9d 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer.js index bf416c44347aa9318d35edc904f3012ed7e06cc0..0ad86b1ef2d4b0ca4b187d74465636541ce9a2bd 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier-initializer.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier.js index 769990cab6b41985b7378f69b0621f07e2801f04..57e4b077bd8ec70549b03238ea6525ed9703bca5 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..d656a760974197ed0df88adba1f3363610a0be9a --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..6ee58c844cd21a6ab963bb271ebb2366623a8335 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..23e406a28f042564373afb933b147d96c92dbc56 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..b5800b5c771184555cf1a1581a6da5bc60309d43 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..6dc6cf0c17a6ca338c2ba4f977bff2aa1cb3fe4b --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..d5a380ed39a9717bc6f96ca039739fb7f086cbea --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js index c80aa0fb19d211b80a2d5556b9729d6f05532e2e..721016953d4b158de2fd523d870ab7747867c7a3 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (regular fields defintion) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -58,27 +58,21 @@ info: | var C = class { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; } static $(value) { diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier.js index e6081cec139933d06f742c00220d3223f361ed2b..2f2f562b382038e1c9a9093bd3e69eeda21ac01b 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (regular fields defintion) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..6f2cef7be26129f08c3f58d6d75de4c6b7ed0c26 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,95 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js index 2f02754482ce0204baad16d2b6b433f83bc313cc..07baed21d829821d9614e3eef62c6ad85844b318 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..dbd238fdcaf1d7cac751e5c3c6823a681e5f3306 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,95 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..1235ee3ee1cad86ba937ab400cae283fc2a13000 --- /dev/null +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,89 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1 + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js index 48835e88a77b9f5947b22587999afd08fed10c1f..e2cbb9e7bc6f1e5f3ca1605995a84f331edfe72a 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js index bc7881bbd3e1034b5859901f4517946486aaa0a2..bc1cbda6c9cee38128bf591861f178d227fc75ff 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier.js index 7d220b583ce8b191142357e7d2e6d5005be623be..6b92096a8441c5b0a6e87dd218d17865fe698126 100644 --- a/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-regular-definitions-rs-static-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js index beb3cc2488cf1ac7d60979e18f73e55977aea95a..b748989fa0885637fbc4804e04bdc5b5d8f991bc 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier-initializer.js index bbdfedbb51c8d3c77d582b3700d3e4522590ebc5..19577f96c5639fa8cfa46596b50830740e1290d0 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier.js index beecac08901021c84fe1d8e70dfd096efa9eb3a8..998d5833e247c4b549c69ef5e7a14db34d180a50 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js index 77355111773d44d246a70f70688c7599f8df8988..7c5a1ade6266fa62764954143fbb9ee2e6f99c1d 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js index 637644f0e472b70cb7280aa0ac7d3dd4f843fbe9..0414c253924baac8357218ea2846035e5f1125cb 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js index 87052a49a2c87acc505dea5cac5cca21d70842b9..26e2bbeb288a5a320bc7b41f35807119c6cb4e4f 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier.js index 087e6b602cca75c0bcdd622cc6185b0a5d995c1b..db34f0e0277806f06da4e123b2f0d5023f36bd26 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..60267b241e6d99050e2093c60c298166bc44955d --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f43c71c90b0d48b67fccf46d8f3de3bedf1dc1ad --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..c49fe30888441586eec512d3cd2a8e046e51c6b9 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..5a04dc9dd4ed469bf54c63546a8ff26c9e5ad20b --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..a2735fc80159852f473c9794912631e11add7cda --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..3d4332e3cbf942c80a987bb20dac146413beb9e1 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,125 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js index 5863e850322935d4a279d82b23d272539528e507..f9966925656e53356b644dbefb5f3e2072344a08 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { async *m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js index 3f4c9d669c5e02fa43718a1b1bdaa2cfcd6b9d0b..f412f24f643b8d16a6fc827e6de5e98525ade737 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..4a67be1fdd7a3b50b96d81934cc74c323c5bd6ad --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js index 56c4ad6330f94355fcc367c6af84fe8cba00a56b..5bbb93a64fe7bd757385b357741ea2c0fbfcd5b7 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..1ee0e6c603019596e78082c5f221dbd5e79406f5 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..0fcad31030dbf9ca46bc3701b22f2170ede6837d --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,104 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js index 7a69dae3c6cae474bd73b1e35997cbe501f2cda0..7c61c13b20cff5da79686f94a8e99431678aab93 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js index 98f953fefc7002113244955ccd469c2d7f36c0e5..8fec6d625255b0b526bf88cbdba3eb2f1eda34bd 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier.js index eb6574f69cf1e3c1f43f5f1a7d90dcc662ce3e23..ef41a0853ac750339159395ab5a5edc3b81277b6 100644 --- a/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js index 47e9e32ab5b237fdf9bb8224e6786d0017580c78..dc9750b233c9ce0b02a273103e127a6644f98d0c 100644 --- a/test/language/expressions/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier-initializer.js index b68f5a4f9acc5018c944e28956a848035fa5a49e..7492d169e44db9b30b96e980839cf6e140b5533f 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier.js index f326a177f77e04543fc4dd3b33874a605b123270..418b6bb5cb22c8c9afd8531bab01569d46c00ee0 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-alt.js index 2a88cedd6c7eb530a8daf3ec694ef6b4b2b7c38b..5f99dd5ece8b6c7e372f9061df96a6b3da713cb8 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js index 999e3030b7c63d895fd02de54f230355939fd5b4..2ad6e564e1c872a3c77622989cc4dd17ba8e345d 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js index 44c1648c127169102e19160d7d3bf3e6b2d375ad..43367d150e8fbe6c8a0893d3882151807f86a003 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier.js index a8e9636aa67ba4d51d3a73383dce0e4e2d21870a..3ec6a7ceb206bb3cbc4298e98e758e23c81c61eb 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..26bf78ab935d8bf89043a52f35acd0694124e774 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..e5122fd210c10fea498f326b12f8b234fc488e1d --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..7a831c45c68f815aa3311378668a4c432a5ac420 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..8a32100ecc8a5043aa9e85114b28ceb80afb37ab --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..54ebe240d2241e3be8f3092a024ee3a5593750e3 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..cf3e86f543c93f48c93642b964ea91568736cecd --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js index c313384155a4dcd76ee399e115b2268b097cabde..fc0ec082b3aa50cdfb95485495e7d75a860b218b 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { async m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js index 68b413796a2204f929aa7fbdeb1268db69b8b8d1..bfeede6da5eec04d3caa027ac6fc2320f60258e8 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..bc9f3384d32878f2c906455fd2c74289887e6544 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js index ee21047e7ed74bbb08c9d3ab07900e916b459652..3fe7bf6f27784576bb2fecc0cf56126ba6f8d30e 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..db6376c81f13eada7038bfd1a659a91379b55d4b --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..2a6168162d53c5e47805f9a413c453eab10f7c8b --- /dev/null +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,103 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js index 29310bb8d514582d16c1df4a6e739bb9e33569fe..c5c15676b3cd2d3ac10db866fd3f555f097e6ca8 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js index 6776f3be0e3b8fc4de9523270a57f813c76a5f06..b37205542016fb8623b5097a2b11c738ef4beb4f 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier.js index 290a73d4472d54a5ee8243f8f60d4ec7eff6d492..ca856185247e51b20c717331b3f7849f68b033ab 100644 --- a/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-async-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index 3ba63e3ffc8d9f74fcd5db811b6b5c0197068444..1137042dd9a29f544ed9170705c4585205339a09 100644 --- a/test/language/expressions/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-same-line-gen-rs-field-identifier-initializer.js index df763485f5b118422b21849ec23f59cc16f46ed2..b1316fda6f75d1d0ae92d24bdf6e976016724822 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-field-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-field-identifier.js index 6e13fd26d873a15a7f6e5512a746c803a4374d9c..9337a106352d69ef580f509ab25927c5ba7f8a4f 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-field-identifier.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-alt.js index 3d07448b0d2a45486d34966d13ea342bffb6d9c1..a8426cd70d31b521920caf5772596b6d5e24a8bf 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js index a74bc215f8555318940a57c4966efd5c763d7df5..f36b8d6c15097b954f0e2f6ee4db3d7fbc386a36 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer.js index f663a4fff8875e7f54456244d2409db02f95c3e0..825cfca7830c7a5f528587e097eb5f508cbcf6df 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier.js index 307ad86868c11cdd9a0502b1693d2e6cf92ee895..fb102640fa0149805389840a155711897dc7264c 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..66d0cc40fd23741af819b203e8f16ff41d39115d --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; *m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..beb17a445421c04d92796e3c21c941555760b2f0 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; *m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..8b47183cfbc1b0b0db7877438b935f030bc60886 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..3b9eae4956fec50e27c0359e5902d0a9cef7d098 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..ca5a52108f2c760a2d4f6ccfc79541e0a558cefb --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..ca34befd925090c9f152eb7e50e9cef65a15f468 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js index 8626d4d9ceb53401f2220e46a05d2a26ed487989..3918ab35d18d2a782ebc5ea7f09821fe6ba167e1 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; *m() { return 42; } static $(value) { diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier.js index e75c4c43fb66e88980f36a5002c91d168d2ef7f9..3d31b28163a2de257e102f97aeb24da2c85daff2 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..d8836a887258e2d42f592d280e9d9efc5cf70c7c --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js index 3a46e362c5d6d28f57cfa2a3b5e94a13a16bd744..c9c2a764893b968c2134355f78bc2e04d6f6b50a 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..d423e038c19262f47685d17dc21457e92f6c65de --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..bfe5e23174d2334cc5f8188804cbbf15c0814c34 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; *m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js index 48dfcc5dc2a9387b7b7d0b81e7945affb104d28d..ca132e02529f113ff64c404bbed7cee5ead9aeff 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js index d9fd2bd514c406244e1e86cf049309db4f9e3892..582f446ed104550c536f04eb8762a840afbe3442 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier.js index 95394cbfc45d1fc69a5d1093e296fbfec259288a..c2e64130094be54a3fbf8305e2bed64727f7b3e8 100644 --- a/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 43d49b525434bb782ee671ef44ed1dcdb1b87d8f..b96b8580edf8f0ecc17d1b97e7cc4d6e61edcfea 100644 --- a/test/language/expressions/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-same-line-method-rs-field-identifier-initializer.js index d75572687c874aafbf82233e041f72dd8a7f5b6b..627e25df6b5c204c5a598901d826f661ff2b9111 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-field-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-field-identifier.js index 52788e419ec8a9eaa5d2a4019d854f536afb1ee6..fbedc11a3143779916dedd8eb3a9196ac77e805c 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-field-identifier.js +++ b/test/language/expressions/class/fields-same-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-alt.js index 6a65f2782d49be23d6a7a4d51dea07b2c43e2cae..a404b09cac3705cd69ddc0c4145ae9b87aff95b1 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js index 2fcabecf4e0f2dc8ab8ee84e521389f930d0ab71..cc836dc7a4b49315abb754bef20d66f2188752f3 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer.js index 0204afa5e6ac412340aaf46071f5ba98a323e2ab..3c7bba56d850169e2fde2cf706518a8132163b58 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier.js index b1053299117fc0bffdf2a80205093b32fde75771..a509074c7c927abf727ef33548f5d2b7128bdba6 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..8bd431c404995803c5cd348f98b54ae7b05f258a --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..ef3c0c7ad404f446aff6c938ba3fb52eb295718d --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..df91eba8c4c0bf9cd5afb52b1edca1f3f427a19b --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..94acd5fb9077a1364390434addb1e03b2819242e --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..3cc1e099208ca42234de47e3bb33fabc5274b064 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..5dfeb484e6ae158b17f40fb9ba56c1a9509a5899 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js index 3aad6acb36022ad9d6c7b295c364bbd55b4fe9d8..deb0728cb344fd9246ed1099dcbabd81c5b1ca47 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; m() { return 42; } static $(value) { diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier.js index 7079bb7a6f555412fc1ae0eff887f773849e84b6..336bb8b1d97e51965d8f09a0755038fea3a34ae1 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..cf6481906452749a5ca2da4411f9f4eaa61f3265 --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt.js index e60739d025889b8b48ace58746a60d60a7ccff00..b37f3ef8d3d7191c90a184d578bc4f6f04247591 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..d731183f00afcf0eace6d20ec9ceac6db3b027ca --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..99793890074d271b2915ec06ddbe2cc42f5be43a --- /dev/null +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js index 4490b983866d4d29d7eb797aee042913ddae37f9..be2a90f3a659e7c94aeb41a72a1c4f5a868a66d2 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js index 54220041d4b75147aecef0fa65db6561733559b5..3ebb2f1816d2f60ea19e364ade3e79beeaf82fd3 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier.js index cc08c93317e0f42ee4732daf301b88e8f151ef20..36681c0beb77d61e9fa7da7cc7b72d24f0ac732c 100644 --- a/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-same-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/expressions/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js index 53c726d831727dfe6f913b25a4df1486cee3f98b..c29dc26069e019e71af20b14e8dc6633f340846d 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js index 6a13112465f0ea294e202b2df9fc185785761fb0..651ba78411f5ea41f8e8048f1ab9824f507d531c 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier.js index 77f2f760df27a6192384bab33d174c8532c31fde..900646d589b0e1e6bee49d56cab1917d082e253f 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-field-identifier.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js index b7e59d2270159f7de2ce9732b45ffa101773906d..85d87698009dd1ba9013935a62ee26f94430977f 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js index 1590c6fbecaad5fb94cc762f8ab3ed928052c4f2..b92351ee56c30875e0cff5c5361536620efe4d0b 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js index 4e9eb7d88dc1b693a4e140b7f4b4865d27e99d0e..5e5b6d2fe0d88be1f10e49f3154bc8c69be0505c 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier.js index dc07187285478f7859291caa1b729e575f881ff5..423f695d09aed9ff6e96b81f26e47baa6269cf97 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..826c112aa840a1004bb9e291fa7a78b89a05a8e6 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + };;;;;;; + ;;;; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..57027d8e82cd1233279e0d9a5a13e17dc4b76f71 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + };;;;;;; + ;;;; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..21f92229414334ffb8b2ed675fd32d32153ab2c2 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + };;;;;;; + ;;;; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..d0322faa9b54665278157999261c236cef766702 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + };;;;;;; + ;;;; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..d4c4195bb9134ffefb8cd8b04c73d005fd3ec9fd --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,111 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + };;;;;;; + ;;;; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..4331108e29b71e88fb5a71f11e00f531c1d23432 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,112 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + };;;;;;; + ;;;; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js index d451faabf13cf09e4918dabb9d61d803fa7f51c0..da67af6171c32bf6bd2f2e03bc349541496ae21e 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (fields definition wrapped in semicolons) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | var C = class { ;;;; ;;;;;;static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; };;;;;;; ;;;; diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js index 718e57c760ff6eb03d431590706ca3c370c8a603..81eb74e209749db02e4233afd122a62545da9dd1 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (fields definition wrapped in semicolons) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..2bb649ac3c3c2101aaba0f99dc01ebf885134b96 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,97 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J;;;;;;; + ;;;; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js index 56476171f5e7de0aed508b4e73c513bc177fd945..72fdc5a461164bafa8b5460f6b3e9b4ac73f1137 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..032f6f54457f51c72b03cdea4c3ac17934bf3d3e --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,97 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;;;;;;; + ;;;; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..c454787325f8d70aed57a5340bf61f11a0c31419 --- /dev/null +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,91 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-expr-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +var C = class { + ;;;; + ;;;;;;static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1;;;;;;; + ;;;; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js index 91f24eddda805a99fb9bf4f88a4722df7bc885e5..5a78f0f15258a3fd0fb61f33d74459d598e73e6d 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js index 600d128f4b11b2dcbb2f0d7682099b7f7d5b54a7..68786655751ad66aeb64c70fa901ec6b334c22d4 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js index 96d00ea178ac2de9e39883e96d5ec2545a47bef9..a311dbfb48c4cdd11179855f5701323dab841689 100644 --- a/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js +++ b/test/language/expressions/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/static-private-fields-proxy-default-handler-throws.js b/test/language/expressions/class/static-private-fields-proxy-default-handler-throws.js index 9649b5406a0d30fa4839b0ea013e443a0421b4d0..86a59a668f7ad54d2801664e35e5fc3593584780 100644 --- a/test/language/expressions/class/static-private-fields-proxy-default-handler-throws.js +++ b/test/language/expressions/class/static-private-fields-proxy-default-handler-throws.js @@ -22,7 +22,7 @@ var C = class { var P = new Proxy(C, {}); -assert.sameValue(C.x, 1); +assert.sameValue(C.x(), 1); assert.throws(TypeError, function() { - P.x; + P.x(); }); diff --git a/test/language/expressions/class/syntax-error-grammar-field-def-has-initializer-no-sc.js b/test/language/expressions/class/syntax-error-grammar-field-def-has-initializer-no-sc.js deleted file mode 100644 index fbaef4ff02b464e66b54df93468904e653669fb6..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/syntax-error-grammar-field-def-has-initializer-no-sc.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-field-def-has-initializer-no-sc.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - x = [] -}; diff --git a/test/language/expressions/class/syntax-error-grammar-field-no-initializer-with-method.js b/test/language/expressions/class/syntax-error-grammar-field-no-initializer-with-method.js deleted file mode 100644 index 8d5165aeead6afcfe415fc2b2c91b86ff8b05925..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/syntax-error-grammar-field-no-initializer-with-method.js +++ /dev/null @@ -1,32 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-field-no-initializer-with-method.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - x - m() {} -}; diff --git a/test/language/expressions/class/syntax-error-grammar-fields.js b/test/language/expressions/class/syntax-error-grammar-fields.js deleted file mode 100644 index 6407595550068e461f86f46c8e23e09055458b99..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/syntax-error-grammar-fields.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-fields.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-public, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - x y -}; diff --git a/test/language/expressions/class/syntax-error-grammar-privatename-no-initializer-with-method.js b/test/language/expressions/class/syntax-error-grammar-privatename-no-initializer-with-method.js deleted file mode 100644 index fd4b1769c85ac0759b15eb9bd9bf67eae6965b94..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/syntax-error-grammar-privatename-no-initializer-with-method.js +++ /dev/null @@ -1,35 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-no-initializer-with-method.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - #x - m() {} -}; diff --git a/test/language/expressions/class/syntax-error-grammar-privatename.js b/test/language/expressions/class/syntax-error-grammar-privatename.js deleted file mode 100644 index 27af62cf402c2b2b11de40c091fffb4b02da37dc..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/syntax-error-grammar-privatename.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - # x -}; diff --git a/test/language/expressions/class/syntax-error-grammar-privatenames.js b/test/language/expressions/class/syntax-error-grammar-privatenames.js deleted file mode 100644 index 8ee4dfe2771bb498a47bc07dfbef65753782d2bd..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/syntax-error-grammar-privatenames.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatenames.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: SyntaxError (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - #x #y -}; diff --git a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js index e12ecfb47f976372328b6632e715424978cc4f7f..2a6f584d7bf3099b22a93a6a5daaca8cf5fef081 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-ues-error.case // - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js index 9dd80bef4ef16f0780257cc3051f4ab92b227e96..ed1209dbcb6838e2f23009e3ea940aa572be6754 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-zwj-error.case // - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js index efed7d1a68c1bf4551fc105fcc543212558a0c7a..2fb44276e47804f31035b3b0469624156d191243 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-zwnj-error.case // - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class expression) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-error.js index 9fa2055c0da968679639fbadb1bf279baf27e964..378ea8d9ea38ecc5929f687837f9838c28a832d1 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatename-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-privatename-error.case // - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template /*--- -description: SyntaxError (class expression) +description: No space allowed between sigial and IdentifierName (class expression) esid: prod-ClassElement features: [class-fields-private, class] flags: [generated] @@ -24,7 +24,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js index 07c84a94b324677d52f8a6a150bbf548ee6939c8..b7675a27585289766a2ab8d7156d8b01b244ce35 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js index ff96485732ea12361736cabd8940626043704d75..e6ddc39884aa43bae5fdf5c6e88b498b5888c8ae 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js index 4e5187f254d18f79305c2a720c340049eba95715..673cd74c5cef9b57c1f70063d4d1409183d7b5dc 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js deleted file mode 100644 index 6628fbc8c5ee28c482dc5c2fb10da23c7bce9ce0..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-identifier-non-id-start-error.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: Valid PrivateName Syntax (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - - IdentifierName:: - IdentifierStart - IdentifierName IdentifierPart - - IdentifierStart:: - UnicodeIDStart - $ - _ - \UnicodeEscapeSequence - - IdentifierPart:: - UnicodeIDContinue - $ - \UnicodeEscapeSequence - <ZWNJ> <ZWJ> - - UnicodeIDStart:: - any Unicode code point with the Unicode property "ID_Start" - - UnicodeIDContinue:: - any Unicode code point with the Unicode property "ID_Continue" - - - NOTE 3 - The sets of code points with Unicode properties "ID_Start" and - "ID_Continue" include, respectively, the code points with Unicode - properties "Other_ID_Start" and "Other_ID_Continue". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - #\u{00}; -}; diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js deleted file mode 100644 index c652458c3cc8b7ff723131b1f91a2be0d0c7397a..0000000000000000000000000000000000000000 --- a/test/language/expressions/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-identifier-non-ues-error.case -// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template -/*--- -description: Valid PrivateName Syntax (class expression) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - - IdentifierName:: - IdentifierStart - IdentifierName IdentifierPart - - IdentifierStart:: - UnicodeIDStart - $ - _ - \UnicodeEscapeSequence - - IdentifierPart:: - UnicodeIDContinue - $ - \UnicodeEscapeSequence - <ZWNJ> <ZWJ> - - UnicodeIDStart:: - any Unicode code point with the Unicode property "ID_Start" - - UnicodeIDContinue:: - any Unicode code point with the Unicode property "ID_Continue" - - - NOTE 3 - The sets of code points with Unicode properties "ID_Start" and - "ID_Continue" include, respectively, the code points with Unicode - properties "Other_ID_Start" and "Other_ID_Continue". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -var C = class { - #\u0000; -}; diff --git a/test/language/expressions/class/syntax-invalid-grammar-privatenames-same-line-error.js b/test/language/expressions/class/syntax-invalid-grammar-privatenames-same-line-error.js index 3c784f2c8af2c7b31f60a89797c45ca3a70ec28f..808025a87127ca63b598ac0cc0f429a33f573314 100644 --- a/test/language/expressions/class/syntax-invalid-grammar-privatenames-same-line-error.js +++ b/test/language/expressions/class/syntax-invalid-grammar-privatenames-same-line-error.js @@ -24,7 +24,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer-alt.js b/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer-alt.js index 2208a9877641307e2bc483681ead0a10a5ee7acc..424abf57745a30fa1844a0c3a6e0d0c78a7159f5 100644 --- a/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer-alt.js +++ b/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer-alt.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer.js b/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer.js index 9d5f47865f01f92842e655ed2175d757cab7a801..0580ae14ec9ca02d78c25995a9dd398a8a210d34 100644 --- a/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer.js +++ b/test/language/expressions/class/syntax-valid-grammar-field-classelementname-initializer.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-valid-grammar-field-identifier-alt.js b/test/language/expressions/class/syntax-valid-grammar-field-identifier-alt.js index 66d2ac85cad88ee3c6a34850c0aa2474a8818593..c7aaad46d7b58df14c2a5490e0f4ebc0ea5720b5 100644 --- a/test/language/expressions/class/syntax-valid-grammar-field-identifier-alt.js +++ b/test/language/expressions/class/syntax-valid-grammar-field-identifier-alt.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-valid-grammar-field-identifier.js b/test/language/expressions/class/syntax-valid-grammar-field-identifier.js index 84e3d3babf2e393adf0f9bf63936145aa727fdc0..751697b188b6a824e765ff60368c36e45fed29c7 100644 --- a/test/language/expressions/class/syntax-valid-grammar-field-identifier.js +++ b/test/language/expressions/class/syntax-valid-grammar-field-identifier.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/expressions/class/syntax-valid-grammar-fields-multi-line.js b/test/language/expressions/class/syntax-valid-grammar-fields-multi-line.js index 31c2a2636aa5bd93ea21ad01e64ba981ba14c65e..48b39d2ca55176ca51391bfc0139dc9fa534fa6d 100644 --- a/test/language/expressions/class/syntax-valid-grammar-fields-multi-line.js +++ b/test/language/expressions/class/syntax-valid-grammar-fields-multi-line.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-fields-multi-line.case // - src/class-fields/syntax/valid/cls-expr-fields-valid-syntax.template /*--- -description: SyntaxError (class expression) +description: Valid multi-line, multi-field (class expression) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] diff --git a/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js b/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js index 402984e7443c763c05c8dfee5e7d3c3cf73cb5bc..cb310e0021d39d287d264313207ca9f272d0f1e8 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js @@ -21,26 +21,26 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName Initializer : = AssignmentExpression - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer.js b/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer.js index 2300ceb9bb599ddc122cfe7d180580cf5d4949d7..d9e6c49655a9bf9c0464a631055a54ff6eed695b 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatename-classelementname-initializer.js @@ -21,26 +21,26 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName Initializer : = AssignmentExpression - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-valid-grammar-privatename-identifier.js b/test/language/expressions/class/syntax-valid-grammar-privatename-identifier.js index 3dd423e4592df97cbbbff03145f0d3089adc63ac..283eb780bc9d533cdcd9331a6c804ef80968227c 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatename-identifier.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/expressions/class/syntax-valid-grammar-privatename-no-initializer-with-method.js b/test/language/expressions/class/syntax-valid-grammar-privatename-no-initializer-with-method.js index 59c168d547a306dad88d94b2ab98202ff3eb2006..4b66f99726411d124eee864d3e35910bcb651acd 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatename-no-initializer-with-method.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatename-no-initializer-with-method.js @@ -21,7 +21,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/expressions/class/syntax-valid-grammar-privatenames-multi-line.js b/test/language/expressions/class/syntax-valid-grammar-privatenames-multi-line.js index 12c752cead61bd59ef0ebeb1151be95632adbd0b..33ae15a190b9e1c9176aa70b9648e1f26acba805 100644 --- a/test/language/expressions/class/syntax-valid-grammar-privatenames-multi-line.js +++ b/test/language/expressions/class/syntax-valid-grammar-privatenames-multi-line.js @@ -21,7 +21,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/statements/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index f0d5d3d8698d63c50a522a4a86c1726338258092..d75224d3f424acfae02c394c0349ab6c8f5f7a08 100644 --- a/test/language/statements/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier-initializer.js index bb5b0c29cbcbce29309ef45ee17dba09dfc3e3dc..6b30d43bd99bb88e91a77c5f5309cfbfefade7b4 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier.js index 8ad3b289875cb454987d284d87fe733313ed6847..cc8d4da3e5cac24f714ec33e438577ff286c1e03 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js index d3ff9843a67e67bc43a2eb0a8af12400608d3488..fa7f44be7562f88440f5fd0446d44b2e05b6f61b 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js index 57020b303896742aba6f9e32fae69b801240282a..a0b7b9592679198e44a473d1e701ce1d7225be6e 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js index 3ed96ba41e8d225a1381227e67fd83985b0ff271..d92d4a349f2583fcb17736326345f49d592273cf 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier.js index 21c2743ab5ba86e4efb1a57f5a4df2ef456f4118..148e8316ddb4b5fa9459a95d47e57d85f9146185 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..9371edf28058507ecc3a63fb4c1bef6ede5a0e33 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..530f0feddb30315db01692f3ca2251dc89200e3a --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..2e5a52fb1aa849a39887c43b924b24e8c3b4fd29 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..17737b4de471e4086e3e18afba245e09f3d2f5e1 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..7f9fdda34169520a873ecae86e478ff3b761a802 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..0cefd9ca0232adb7ac151b1e31860016015804e5 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js index 9d7602d88aa3fe1cbcc2da9ad64d9896b27fd79c..81d5f8a4c1f96fade01ffa6cd484bb733389388a 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { *m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js index 10801eb81da0e7aa108ba6980b7781753044d730..d286e9192c89760a558a21e899d5976c5ea1280f 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..ae4dfe1085513291d64447f9238e9cc0502cc3d4 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js index 77b9bc9dc6d746b40316959b19d56bdcac6bb506..f93a60dcc104efade9ac15fa4dfb76bc81191e85 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..d83143d05a62dbb470546883d58fadee4f4c8555 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..26412e49f6f1399acb92dccd377b9a97a9011893 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js index 31184005f2be843c8d16cda94c4252ab1fa9faf8..828d7cf6bb65677d0c1963a4bb77c74eba2c46b6 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js index 879397ec0864e577e440454621e2bf196009091d..e20380d0fce61188717f02a2c0ab02003a18f3d7 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier.js index 68718363b526caf9a7364f00e493141cb9cb294c..fc731bd88f80571f5eeeda1d0191ad805f9a188f 100644 --- a/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 61b6da15b2780c47bd7b74a216f659937fc24693..da5e252052110d3bc537674a4d61ef701071fe4d 100644 --- a/test/language/statements/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-method-rs-field-identifier-initializer.js index fb52206576bd87262672c7072f05fed3e86d11ff..334f5ec285cbd7f5e9258c7b61410fe55db40bc3 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-field-identifier.js index baad9d378954b8706d5096b685ae816fceebb969..69d97d811e8cc7cb5604f98cad53b9eadb6f0576 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-alt.js index 0df46fd17314331a0820f84bee77271ea8306bc5..71be3d826b47b35425dfd2736aae0055cc6acf16 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js index 0ec2d10a1aa2ce7ef35dc1d71ed42ef068915585..f2bac39182ab7cde7cebd64e818de0c55af44044 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js index ca703130366e3fb9f3f5c300aa245516a052ec2d..77029058664cc915f2bde2ef69db57946ffa5f99 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier.js index e5a1a4257874528c8e1d15917397defca5879eed..fca2d35e25a3d54d5b6d047e3af9170dc0917bef 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..314c7a6157563eac3d75792c89e82add04914af0 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..fcf17e7581f6dee79bc94edef5ada246d5894deb --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..75d8b1895413fe32de7c60b6d35fb0ad38aff755 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..6bba34272bb4b1ce17a8614cf727f617946020ad --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..1ff8aa7651ff5ee19d28e26fbf6f70c11c279076 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f0fd6fe03d390bb461a498e63f895191fd657a70 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js index 9307410f92cf85be461820213f7b7ae7bdcf1f53..655b12f3351db54732d18b1669396cfca4ee4c89 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js index c8674d0806cb6844897f84966f458272d262214b..d01ecc5d872d57aa5bde2b8f9d3fbdc15a8f3fcc 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..15efc9e014b787b8131fc3ed9b4bc5a2e5b51dba --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js index 5966b9f911e98d294dbfc321d4f5ac6dc7306d43..5e4685a351604dbe5999dce82ab8e12daa3ed4cd 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..574b0cd95a79ee1e92bf55111f5afb6c5d83c289 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..b96c6491ca6e4c1b041fc613cf070019bf37a218 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions after a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js index 1a79b9f781ca863662699f6aed89c368ccc90976..70f4654933b7513a4df9cda3d039887dc167bfc1 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js index 0effbde88ba8f112f00a74ca7693f96d43371c0d..dc566dee263f1adf76c92b8fb740993cd743f322 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier.js index 225353687c33bcd9dc30f1ef68169fa55dc27633..01ee0a655f79887ef8b7d301d7b3ba02e587afa9 100644 --- a/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js index 00a11b1b80e689863e6219cfff6e24951cbf6b16..4193fd5db72db5006b4514c73d0ec549609e25b2 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js index 31e9d4bd0223211d1f80ef2c0e6f59453a395a9d..c0d859ba0dcdfc5443e10bc436ed1feef9d0e447 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier.js index 37a91f83672218b77c8039e737be73de4e719a1a..84fe4503136c4f48760f7dec52416db5f2161ff5 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js index 2e3f7e474d4f369896c67bca03ec35181022d92a..545545a6796ec89e094e4792aed11c925c806458 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js index 71ba207ac647d4aed5df09e286c35c5eb90574c6..3e40782756cb01cf3da8ea14b9c705c0b83896a1 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js index cb27bfb4e803c9a63ae95b0d1a3c60102e3685cc..0bae129936315dc0b1ffb1e4c3d2513cd412e363 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js index 88e75b193ccb454fbd1b44fe2445d1f7ad367685..ae07249fe7a3cf4867c81ad372ac33e5a8342a16 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..69a193568074e0042d800353204bf6f7d23741f4 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..34953644e6e36ca3a4e6f1bad1a0c2b5685ff511 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..894787f2c8347e9633a3de134e7a91d38306a3d8 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..b99a59d829b73e78778b27b7924e222f8510d8f0 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..efb94dcd9f59d028e4784257fe83e8d442e93286 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..e7b11c308421132659946c270c81ce75a8226046 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,125 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js index 1dbf9e7330e160ef46b7ccb2bb184c569608f3c8..2f1ced343475e5a0b4ea8e1751d9419d49265035 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static async *m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js index 8cc3b1eaf3f7e89204616f7363cf12dbeccf1555..9bd67953577f6dccb41a1ba4a3178d5df0725385 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..e0c1b6eac9421d8c116d4776f7cf7e22ea5e0cc2 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js index 3d53db9e2bead1dc7c96034a6a1948266cf580d8..74f43bce35991ed39145c817af7d6e0512ec0b11 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..27fc914429e0996fdbb8382b4bbede5832bea76d --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..caeb85e57efed07f59cfdd3685d80570f84afdb8 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,104 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + + +C.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js index dc2457f1b4c72d6ca1f733a1208b49292a6960e7..5e596a3b25fc72d538a201ea1c024b4d9ef4033d 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js index 6e0bd25a22811bfcd52cf0064d01ce696bd6037f..b1ae4c245b6872bea8a9bf7279971fcd3be93eaa 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js index e154ad948d4f696663a6c5e7d5ff712e704cc6c1..1859796b85d6d9d818d5e7bbdd7c5ad8f29e445e 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js index af52cae65b86958838716eb52e6822097332244b..e4b1f887e2b4422d21895af457f221f01a9df5c2 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js index 9cd2102348533e203287fcc50152cf654afab18e..ccc54913a7c4b2fb090e909cc55cf62414371c29 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier.js index f265b554a151b0545283f71358e500428faa9b67..2fbf002c49e57bb9a4d0c797759841479715508f 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js index 2c1614bf00cb262552838a03153f22c599330bbd..eb06ab96ddcb09dff3b40eed5e6f81e85c0e750a 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js index e77d1ee1d6fb2fec10a7d0b1c677c55975932fde..6ac29798eb6a329716a84c2a3c8dca19716c97a8 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js index 615777f71fbef2370a616fe2d24286ffe9d84a38..4a717a34d0347be297397a33734fdbce156bfacc 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js index 6dd90ca9d89cc6600ee9d8ce44c86efa7dcd0e55..456a141c7ae00a03c5a34ee474651cb45d0d30c3 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..2ae364efaf122fec5a0c5cf7a189375a375eee2c --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..7a2022940828d83ac68fba47ab3b0327e21745c2 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..cd55d42a016348619354316788a6265fd7b7e7d9 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..8723f43953ecaac96db097ff6dad6abcfc2a86cc --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..f8b8fbb1200ed121a515fc769d7374853bf28cab --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..eaa3d8e0827a9b141cf0a4d3838a2ce391f8992a --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js index a90f56c3feeeeb9dcb3d7dc3a1a23ef780ac050b..a47214d97224dec5feb7c756938fd378d8e9c4ae 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static async m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js index e3ae14e8dcfd9d317c8ff01fa249efafeaa6ed88..5519040ed40ceaca4eb9a5e59a26d207ac59db24 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..424a78f852749d449059007bdf8dd57bbfd25958 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js index 79460938b79cfb7d63a32d8d50a549c02d6e08d8..8b3699533cb3f5b8f40a33cf175f1f690924799d 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..7a9b92ba261d11e69478ce16b34492492743a799 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..883090c62550235745406b1cf29e0b0b5352968f --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,103 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + + +C.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js index a3a825ad927e8b0346e13d374ee3629061d20c6b..f290fda1c20b39e7fc55958cbc7c42dc2e14c4b6 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js index bf5c8cc24fabcada79c4b027d8da91a04a0f8b86..ea5be51cc44491b03c95244a8e44e79dad07d400 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js index a38f6c4d7476f12858fd73e255a5a616a799ac86..bbf4349800b53a52c5894ad54c4a83a60f4717fa 100644 --- a/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-async-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js index 0991ff9354f978ff852bf7788f3edd837f06e93d..d6a424d25d469859432fc7d236e5236ade68847f 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js index 5d3c96d910eaf16ada97979c8a30f7981f4c471b..ff9665046e617cbaa26851ad92475c51540ecf8d 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier.js index 30d0d1e4e96814ba2910f69b99c92ffbfb4fe8ab..d3e63faa91394c9c8c5ee98e3061c54af54baa5f 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js index 30ccd4f70702d1be90ee75fc68e115533d281556..20a5b47ed1ba8ab5f95b01c963acfd8b1046c0b5 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js index a924e0a11f675a8cdc8afd01e666cdf9e4f9e43a..b67f76c47470f36ff69b5582b53549eb636f04cf 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js index f8a948131ceb0723576988523b36b72ce1afaa25..6e11bd2fa2a7c3845ee37ee85e985a339a1e42c0 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier.js index 682f1fdabc89c83d2cb0972839b76edebeec8978..d93ec247c97e0a4d542b35b02672ac7bea4a8931 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..400d167e2b042221619b1c6aaa6220f4442d29b2 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..6880c808e9c678d03ae2705dfe0cdaa04c08db56 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..4ed6420d6a6689c14f50ba7fc542e8fb93f5b2df --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..6ff146d72906e903e44ce85353042aabe9270ab6 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..bf3f71dadaf0c04330e6eb7466c7b56e27b4821f --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..e9ab085db6e6a0a769107775bbae8295899b640f --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js index 910ec2e31c7b3dc22cbf35e7f8b627bbe759e640..219ca19314f269105be7c6b100f6a0e4125e169a 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static *m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js index 8df748077fc04a87e2139f3479f0836ec69651c6..08d95b8ba2d0dc46983828a06b4cca581e2c014c 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, generators, class, class-fields-public] +features: [class-static-methods-private, generators, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..8d4d2322d6de874ea7e6116fd4c188fb49fdcdaa --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js index 8eba30baf7c2474ed824e3ed7fc7e0b843f50488..f25a6d1de1fc860fb57cbd4ac91ab2dc726ffc84 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..342cfcfe8ac9cf045381322368e3fc85f126a022 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..316571e43021a81720dbfceef110d44b784b39ad --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-gen.template +/*--- +description: Valid Static PrivateName (field definitions after a static generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, generators, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.m().next().value, 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js index aa4abf04b31c47fb52ac32055034428b5ffb288d..06e10db2d3f383c330710bfec2e330b7b744faa0 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js index 2e0cbb484c4c496a88065d91bad5d61165a38851..f008e11b3cb33d2a711d02bfc8409d2770c254e0 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js index 9ee640049ede966cdc1990ec2f7cf037028f96ec..18776b0c366517c21b3489fafa2b68a9250533dd 100644 --- a/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js index 82393b1bfe8f9942e25bec090aa0be1227d1d57d..f4d6073a84a2f80dd7baf4eeca05ff8daf2ea85b 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-after-same-line-static-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js index 24fb8b5632dcc94e66232e9f2e469d76aa64538d..30d4c55e83cab8efb74d9392aa709c3914f9c56f 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier.js index cff5a7f9c90c79bbdf1886962b47f079fbbb0eeb..69af3c1dc76c6bce95ad67091b37d2bafb160dda 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js index afe1dcac02791c95a561162e2dea7f8692e50bfe..106db2b63a193efbf74c4a5846d378ff0f6dcaf7 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js index 047f50e7140d1b1c42349da73c394b1b6464f1b8..6cade157119e79145eade0915e3085ca52807213 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js index 73abdab8c2d212c1e921c88c131d8fd62f7d2042..e32bda49144fbe2411922a3d3b7e51ab68df1e15 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier.js index d736747c320b63435ff14d6241a6f57ce8d8ee17..f753d298fb3f2a36de9a20e823f1efd1fbb99afa 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..2766d3c61e254a5111d7950cda30e75d3618af3e --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..aaaf0f82d5ae9b0c3fbd214fa91b08bdcf03d162 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..aa5e779b87b05e969bbe22101eaaaa637d3841ae --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..cb7c0ea53e9bb2f85877fa2cd231deee93a8cd29 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..b8edca96f4e7a9648b07dd19890b483e42234551 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..eb84e88ae7cfa96b72ec035a32d552d486652308 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js index 35b58661cf6fc7a3f9ef3f7189686479673950d1..356e56fb9079ac146de530cee33283e2e27d0d7a 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js index 4d9376e51beacf6fe01d5d918722b5ff6a2377fe..c85aa20561b0e2b06f1880501fd755c8c319b2ba 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after a static method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..66809e342157bb4ae9d825a2d8bd64aa63e0a961 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js index a4df0606830ebf9cd3ab7b675a5edb9352a629c6..22a94cf276fcf5e368368e701893591137114bad 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..9692e0802a083ef1d4c3960b6616f3490e8547f5 --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..a3fe6c07f311dd99c88baa56910d98be121cae8e --- /dev/null +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-static-method.template +/*--- +description: Valid Static PrivateName (field definitions after a static method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false); + +verifyProperty(C, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js index 75fffcc2fd55257da8d89749ecf53090dde15f13..9fac777757d671b6539080b97c3863d982ff7609 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js index 222e3c3d0c71b6324f525ecf98e8217b6c661dd3..a9a98342b1364b339bf5dc40eff9bcc991b158d6 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js index 59fd93d265da3b625f638016c9ad2c5b24d5ca4f..eb9906bb7e30d6dac1e84502a90e62605e80379a 100644 --- a/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-after-same-line-static-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js index 7520e6546fdf2d64d2a54700a616fe717ec630b1..c7f58fca98a18a7b0d24777e51b8712f42f25f41 100644 --- a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js @@ -16,7 +16,7 @@ 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/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js index 75612496c56815165db23f23ec2742368aaad5d9..4d75ecdde5ab4ba94d58931ba4fc0c16794bfbe6 100644 --- a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js @@ -9,7 +9,7 @@ flags: [generated] 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/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js index c5f63012a8cf68f156ee88ce1743f60276b51bfe..808c80f6747456afcff7e8c250f0dd6ccd72bb4c 100644 --- a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js @@ -16,7 +16,7 @@ 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/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js index ca04c448dc9c2d6004d80bee0b7af202938b3a56..88c47f2c7ee887d005fa420dbd51386a1b2cdff3 100644 --- a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js index 7ee11c41d4ec573445d292399170cffca2b81f90..a8375776cefdf77981daaf635751a81d6d51ef1f 100644 --- a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js @@ -16,7 +16,7 @@ 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/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js index 9de84949fd7bcd033985541cf87b559d3a2a832b..586a59e3b0a43f53e19ddfb4821e25966cd5ac9a 100644 --- a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js @@ -9,7 +9,7 @@ flags: [generated] 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/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js index 1ba08ba625317f1d6adf6e6799ee97ad05345765..d4999d75dfd597042a43abdb70132543b9ba56b4 100644 --- a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js @@ -16,7 +16,7 @@ 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/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js index c2520d741691e4eadf6bf8ac815c4b382e4bcbd2..ddeafb7253201841e93eef563a3c8acbf3231bba 100644 --- a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/statements/class/fields-direct-eval-err-contains-newtarget.js b/test/language/statements/class/fields-direct-eval-err-contains-newtarget.js index d0768c666da7628cf4710a40d34aa0dbabc475aa..b634e68664e4e4038642fe269478de21d831daab 100644 --- a/test/language/statements/class/fields-direct-eval-err-contains-newtarget.js +++ b/test/language/statements/class/fields-direct-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/statements/class/fields-indirect-eval-err-contains-newtarget.js b/test/language/statements/class/fields-indirect-eval-err-contains-newtarget.js index 3296a5902e8438b5a83e1dd3dd7a83ffa529edec..0bccd2bc43165e3959a2d973f166aaedeb2fb1c9 100644 --- a/test/language/statements/class/fields-indirect-eval-err-contains-newtarget.js +++ b/test/language/statements/class/fields-indirect-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/statements/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js index e749c637b5e15ca36480c7b5536dd32de77163fc..ff9937bd557909bb5eea040efaf4ce6b0066a64b 100644 --- a/test/language/statements/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-multiple-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-field-identifier-initializer.js b/test/language/statements/class/fields-multiple-definitions-rs-field-identifier-initializer.js index 687a0e89b5808d72046f3f52d086d5dfb9c7fc07..94be02f9f365d8777689cc569f635637426e57de 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-field-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-field-identifier.js index 90f5beeac853e37ad609fbfad7ea339bb6f41d79..5cec15676152320d29264e203e1282c96c54cac9 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-field-identifier.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-alt.js index 2ff87867ef512371f17737020c7210e038dee9f1..62a36300c3e63a472d851ac20e22b7240f9f59b7 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js index 6f79a3983d264068eee04c21a3bc5e2f8079e1f2..f427a32a6fb1283ed647ea62704456d2a6f739d7 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js index 2d0407dcc96b6c3f01516e6b56ea97eb7dea62a2..71c7dcaedb0783ac5dc7c270a07d6f35ca7ea3b4 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier.js index 83e1449291e230d4561d0f3100ecd3033364c43e..938faa633456f06262d9d42004c8761bbe4ba99c 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..688ee936d3667f7642f0e32393253ea1b5d2bcc9 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,167 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..d124b7bb7028f932aee977409646522c7cb1e973 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,168 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + m2() { return 39 } + bar = "barbaz"; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..b52b87c40d2ea903f13e7c4a606a3977df6b183f --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,167 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..74e830b3583cb3ecc831ea18a05ce06316258af1 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,168 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + m2() { return 39 } + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..b5dad58cf64ccfdc34370c251a035f9a41df154b --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,156 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + } + m2() { return 39 } + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..65606f39954c132639623bb4e6954a9733a4f8b1 --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,157 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + m2() { return 39 } + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js index bcfb8748ea2d2319b9195f8e50bdde62c6f655e2..39e4a7ef52716005d96534461be827f21ccf8c07 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple fields definitions) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -61,27 +61,21 @@ class C { foo = "foobar"; m() { return 42 } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; } m2() { return 39 } diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js index 09478b3851215ad716ad23135fe1cfc29eea36ba..e0c00429ed3f58a549bde0ea114d4c1320970706 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple fields definitions) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..1f29e1ab8d10dc0d9ab6a27dbc181002b19a2e6b --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,142 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J + m2() { return 39 } + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js index dfdd73f063874db6f8fdfd5c6e27bd598b3cdab1..b544a1c60c60ab1cf3ffa23fa29fa08db6459e8a 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..e0e4a8f7a087d5c534521054441e89de84fe92dd --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,142 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + m2() { return 39 } + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..817bcbeb8ce13cf31773c93befcd18ded842e56a --- /dev/null +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-definitions.template +/*--- +description: Valid Static PrivateName (multiple fields definitions) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + foo = "foobar"; + m() { return 42 } + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1 + m2() { return 39 } + bar = "barbaz"; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.m2(), 39); +assert.sameValue(Object.hasOwnProperty.call(c, "m2"), false); +assert.sameValue(c.m2, C.prototype.m2); + +verifyProperty(C.prototype, "m2", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js index bca1831262debcdd44c38e92f8a4fad02cc64dd5..1ac713647c0780fd569927fd758e4ebd6fc8ff42 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js index c21ea4bfe3bc81fc2792ae39665f380dd76c325d..a0002bd89b9d6975abb362cd16df527081227e6b 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier.js b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier.js index 00fd6c192123a2674bf14dba5a3d6263102e8b3b..5648b487eaaac35893c317ba970dbb1e342d4c62 100644 --- a/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-definitions-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js index 22fa2b0da1eec35c536eb8d7a38a05df94fa2cdd..e3f03241c68dcfe4b426e985b07c0cddbb68bf86 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js index 76c04b7d492e1ca15149f06037f8877980a690e8..1e42a966f2813feebe0d6f82d3a01a91d0daad29 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier.js index e247070e437e5927b74adf0e43cc704d3fb417ae..ac5a0d4f620d3540c623111b79ad3c4f064b9db6 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js index aa000ad656c7817b3fe530ea2f31099d1c776f4e..400e5d122ac8e7961ffd9bd7f376c7f0223bf401 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js index ab1bb85ab43ea18addda5135d703d77976edddb1..2c29899a91f0e485c184fa3d98e9b861931e2349 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js index bae395d9ac73cbbdcca81ab1eadbcb268bfffb3c..d6cde656506eb15b8c1fae1a904d988e9d26bd28 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js index 272bc0f863070fed68de52b946793bc97e4ddf45..0cc988d49263859ad3d0c3bb5a04a4b02652bec1 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..09ade3dbfcd051f2b9096cab43311e0ebd739752 --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,145 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..356fd5374830f969a37dda51529b1aa4baac955c --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,146 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + foo = "foobar" + bar = "barbaz"; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..d1b3bc5e5b0bd25feda51f382ac50102c7d80de0 --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,145 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..2f730082f17ef1bf48733f3e4c20fc22ca259f73 --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,146 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + foo = "foobar" + bar = "barbaz"; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..a12442c283e7c82895d1d826e3662ad3f0ca3dc0 --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + } + foo = "foobar" + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..346e65cdcf7f6bcbd2b63360df3befd760666397 --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + foo = "foobar" + bar = "barbaz"; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js index ef230394679581f3537ac451096c56f7994e773b..ad1c524bc295c6f617ae59bf38c4409f7a1e6164 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; } foo = "foobar" diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js index 93d348a85aea0f75eebb100bedcd22751f417c73..22ce49c27679ac58158be834592d8e80f91defd3 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (multiple stacked fields definitions through ASI) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..d91358809b296db0776d99a41a74f0dda4884a9c --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J + foo = "foobar" + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js index 9342cb0df3dc84707f124a901b2a6b89432bc2da..81667e7b9a0837f70a37c23565ce54362c5f4bf2 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..0323d1ba9f2c1f122845cdcfe0b9ae68e6828294 --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + foo = "foobar" + bar = "barbaz"; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..00195547ae35e3967449bdc326d4810f813d4c8f --- /dev/null +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,114 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-multiple-stacked-definitions.template +/*--- +description: Valid Static PrivateName (multiple stacked fields definitions through ASI) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1 + foo = "foobar" + bar = "barbaz"; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.foo, "foobar"); +assert.sameValue(Object.hasOwnProperty.call(C, "foo"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "foo"), false); + +verifyProperty(c, "foo", { + value: "foobar", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(c.bar, "barbaz"); +assert.sameValue(Object.hasOwnProperty.call(C, "bar"), false); +assert.sameValue(Object.hasOwnProperty.call(C.prototype, "bar"), false); + +verifyProperty(c, "bar", { + value: "barbaz", + enumerable: true, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js index 13c7d5b6ad69fd2e9b127c6b1d2157376ba320b1..85c20cf305ed1ca76dcfb547be752dbbab129c27 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js index 298fcd3813e29ae591f70138c1aad8e4ce06658a..1adf864b9c5b5c6ecfe66e9da9a86502b71a6a02 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js index 216abbc8b8bf263078dd0907da42a2aadb23c645..44ef30e0849194309668613d371bdd10e42e0a40 100644 --- a/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-multiple-stacked-definitions-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 9c0ac0843a37798e8f209c279fc2c4c615e373f9..4925722e93c8afb0595b6eb75010dc2fc883ccbe 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js index 360326b4af5f4ebeaa5974fef98de0953cdd9b5b..336fe868c277a1ad9544f0f55a1f0aa784d76c84 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier.js index 119e9615903d0fc6992cc045d5b18524a9e55b02..05eb5931beab3478738d1c8b27a59a153f9779f0 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js index 7d2e2a20ab971f2a329594afca18c08f7bfa06dd..ae4ead1beeda15d45bc44af32739b35638248630 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js index 5f3108daea8bb091135fcdc49de920c824b70a44..a1ad8147cb8785e8a03ce2626c5f76a0227ede7a 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js index b379b24f68ab7446aa4fce70a0925e316bce3601..e5f0a53435887821541b86e498ccbf79c11615a9 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier.js index bd161b009e0c768d596b725ccf5ba9e47d44d30d..481fc5a89182f9b3e4cae9b04ad9a84cd20bd107 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..605fb4537e7350e637758bd30eef340fdb1ff458 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + } + m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..239d4919c1756d6f9b77bd8945f484ca4a08a90f --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..cb354f463cb28fe05a84e219294b22aab98d3a2f --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + } + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..b259234b52a55ec477a6d707748a05dfc33e5cc2 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..7239d18edc9af96101f638c16a3b7ff49c523d3a --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + } + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..bca48ba4d3a4e07657aa531234f077958e512e07 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js index def9522ced82a9b71b509d50d7e9d40c390b2598..5220efc71ab7eabc23ad6d8be6e78f20f10c1124 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; } m() { return 42; } diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js index bf2d74877f4903a5bdc5b50265a3b09c217f6ed9..2fe934206af0a4bc079c0f35c59fce0a76108315 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line without a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..d27341dd51f56c79ffb988a94fac2db998daff81 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js index ef29d93d2f0405ba2c6f8dcba7fea4bb05aa0c8b..a93c8ded305ddd71eef66b3090ca464f7d04bfc4 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..162255ce398f396d689207a97b913bcef87362b0 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..22b4b6fbee91c40574750f8baca529025240a4c2 --- /dev/null +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-no-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line without a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1 + m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js index 5dffc941b505cf5f2cfa5f3d4425075a67d10223..0df69cf6d51bf4248668be7ee90f8980ebb0a860 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js index d0d2db69d919946a2d0ba33c76a6238f52da3afc..d5050f0a43b63809bf41b3a7e9bd528a27a5ad0a 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js index 002c1424d0b85f55d61ee4a0bf950d812920b48e..416caf62000c74b26e47dc37d3f7c93a07a28b4c 100644 --- a/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-new-no-sc-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index 98b45a5a8f7eb93cbd131f4ac1e4d74135c7f2bd..8c6791490b36f88cf8f5608c25cba8716c427b57 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-new-sc-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js index 467ee066d3da442f2662383bc6aeba5426768151..45af15f7ad258a8ef835262f8a9612a7b931cabc 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier.js index e61355b3819d06e4abfd62015f55958ce396f9e6..c60648fb25dc5286fc7ae60fc0c463509e691704 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js index b5a7337abc444acf051f2268866321f2299d2e28..f32323d0e2e5ccb42875705b832d81a317b3a33b 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js index a2302883ffcbdce7d0beca84ce3400a4a53f7924..28e4c9228b63c7339c678219503ad410c217c6a4 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js index c5841d293e1e26d050a8889164df1c10a90b8bc7..37dae23239f753371eb546da96bc9c059bc1b7c5 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier.js index 07e31b0595cd26f1be816e904152b467cb8a1f08..e2ae88a41cc66f46e848762c9ba564a7a7ed86e0 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..e078209aa47f46c39f7477d47e93517a0dafe1aa --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + *m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..12b2d42c5e88bccc6257fcc1a0983548432c9ebb --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + *m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..6dfdfb9909715a9d4a5dbd9888e828063df8414f --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..d779f84a502a90461abfb044bcb42ab99cdd9f60 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..c52d4f24fac23286641bf53715bb53cb9cdd8e4e --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..1f5549752aceadc0125a06b7b2c8d56808b08d50 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js index 09243ce85740a9acff52627b844817b482ee32be..cea6b52d2892ed9f8943e0fb4c255ad4dab77b4c 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; *m() { return 42; } diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js index 037f0af699aa493f31d48a7d0ebf5fdc822d0767..7792dae9fd20932871b8b214ce2d1d857ecf742a 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..4d5c49496d238b9154af201049b27473cef06321 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js index de4903af25af8102eec8be9756de72c1b3191f28..d1f86032cfc27eb5400624836c3c44ade99a77ef 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..034439b2c73e0e74200f361220da8b1c42559168 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..82e426f57315b3cea0380ea4399ff51e95d35d82 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + *m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js index 022c50d9530ed3c5ee7cefaa2979f826148d4166..791b9e17888594872cf3e26c57a8f067dd97a04c 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js index a0d77cef6bed75c6a39b2cd412572a46ea55720c..841cf473fe2c995d35ac2e6a2627877b5ceb92c4 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js index 20826472106faceca430761635efa5e9e72582b0..f9704b00633f96a84c8886f499cf1f0f5472152f 100644 --- a/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 619efe11e3631e349301a64a6f60b5facd29ec18..d272ebd40c40e02fea0643b9220efed66578fa95 100644 --- a/test/language/statements/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-new-sc-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier-initializer.js index 2b98490a54ec2526721ce9bbe9cc05703246792f..95406886dbb058807fd062687bd5159e95439e22 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier.js index 77075206b3db0d90ae96a55a3c11eb037f0e96aa..46d3ad2a29a79d8b3bce5d5e088b1f6cf04e13b6 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js index 781cc7baa05110a30fb0cda95f7176da90d26e48..9b2a0a5bc9392027dfdc528e06edcc269be09c74 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js index a68c9c672b77cbdf4937e90df8025a27df317f56..5778a7e7fe13630d5a3df61ed2f25169f36896d4 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js index 0be603cf2325324224e42122f57b6a0ac1040297..522c5b447c73d88ba37cc953bf8e391aba433733 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier.js index 77965045d0ca2c54a74cd37eed5b1adf028f7fd5..bebf9ffcbd5e9d54b3c9de0e95cb0a552df64fc1 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..3b129d8707f06be28c307b79b6ef7a8da1967865 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..deac127cb8f138fa6ff7f4f015fdb6d41d4edeb4 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..ec00e6e04e5bcd4ef4b1859e86f3a9f42b946545 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..beb4f5bd90a74a67a4f89f0316070c6aa22d8a92 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,133 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..00afe0eeb18332651dd024c8d2e74b61293349df --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f1563bbf9882e1adb762ce5ca4404ffe11786ddb --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js index aef53585d1ad85f236f63b3e7a2e9d1b3d5a2aac..17d00c2832fcf38dbc9c3e467b52f5c28d01eb8d 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; m() { return 42; } diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js index d5b6f83f3782e393efaf71e47dfcea96cc11e18a..fc1c9d27ee6c112d64a7626581f5abaf3d2f44c0 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in a new line with a semicolon) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..8179a2faa19acaba24cd6a9556ec1fefa358c3a9 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js index a220ddb7361ed9505a3b14c5a3fd01f896ccac11..edbabcddca9eefa72a0b634bc04102cfc473d1c6 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..a341b4c725b24620ba1d770ff2d59d1f215d523c --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,107 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..f24913febab4ceb75add713681362d6d7ba5ac35 --- /dev/null +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,101 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-new-sc-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in a new line with a semicolon) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js index 32f572cf7e6f7dc4fdec874918cc6649a8b6cd5d..bbdadd514d59a76b7217d4c89d3dc5f14d070fa2 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js index ddfc226c3c7e0b10b230db78695bf3a803fd07d8..cb3d1d82fbfcca532769639ec6c024d7f3d4fa7f 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier.js index e6d17b1502c82a7510af2e97954621d9e78d60ef..1e5bf716f5c10a29ef8fb9c34676ace08f9c89b8 100644 --- a/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-new-sc-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-private-direct-eval-err-contains-newtarget.js b/test/language/statements/class/fields-private-direct-eval-err-contains-newtarget.js index d44434ad174537b2864600dc6b9961294bd3d698..aa430ae65aeb8def8482e35ef951b9ad605a39c0 100644 --- a/test/language/statements/class/fields-private-direct-eval-err-contains-newtarget.js +++ b/test/language/statements/class/fields-private-direct-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/statements/class/fields-private-indirect-eval-err-contains-newtarget.js b/test/language/statements/class/fields-private-indirect-eval-err-contains-newtarget.js index c15dd203a9d5f72c720ca7c749f092a596a32478..cdae3ddf4b55d7bd17a136d29f860076d123724f 100644 --- a/test/language/statements/class/fields-private-indirect-eval-err-contains-newtarget.js +++ b/test/language/statements/class/fields-private-indirect-eval-err-contains-newtarget.js @@ -16,7 +16,7 @@ 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. diff --git a/test/language/statements/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js index 3b6200a167a90b106f2d71d0b066a57b0987cad7..dcc303059c903747297e2bb9e9b413356a35348f 100644 --- a/test/language/statements/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-regular-definitions-grammar-privatename-identifier-semantics-stringvalue.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-field-identifier-initializer.js b/test/language/statements/class/fields-regular-definitions-rs-field-identifier-initializer.js index 6439266ac6031bbe0287fe17b0b3e5d7ec28faf9..1f1c3bf8394a93d991806150732ad2dae1d5af94 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-regular-definitions-rs-field-identifier-initializer.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-field-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-field-identifier.js index 719660f7789df6aaf9838b520955710ea07205d0..5b8c7588e11a2baab2e29992686d887097f48198 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-field-identifier.js +++ b/test/language/statements/class/fields-regular-definitions-rs-field-identifier.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-alt.js index 8d063826b9c9ee04136700ab2c0cc0bcf0e3cd06..1fc3b0243325f43f8f014133791a4730077a90a0 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js index 9e7e93dc4aef2c1e7dcc64cbb51fd9d99cb1209b..73a5c7a433ba158814c190afafdbbc588e5273ab 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer.js index b943795c9e9768b6fee60de30a6d7cd03f00d7dd..0a80f05c5c3e4ed55e30ce7701168de9f9a0a3c4 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier-initializer.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier.js index 0f123c614fe526efa7127e60f6f13f2f69077023..edbc1f65cfa1d157de2ec38c628e3bc2f0011055 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-regular-definitions-rs-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..4ca30010481998fe2811ca80fcc32d071ef46aa8 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..4d384515f0de5b7b893bc29157660f4e3d2885f2 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..d7f37d5db985c379a952c48c1b75c398d303afdc --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..6da17cffe5c48d586b9b47754b8335f9852ae99c --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static AsyncMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..87235f63cb32a1f0d75ce1f061d4fc2c39611569 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f2444b4a57240aaabef16d79e8b15acfe2255acd --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static GeneratorMethod PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js index f32831af594a5d5678f108d88f09773b0511c6a1..20c0bcb0d789f30d76cca36ef9f62ac3281672e3 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (regular fields defintion) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -58,27 +58,21 @@ info: | class C { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; } static $(value) { diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier.js index f825b5cd625b441c767856472c87c2c42a1c3717..f55b60533c4ca38b6e1665eb08f4d864b717c602 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (regular fields defintion) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..bf23ca52cfcda3a675d311e9afebdb0704fb92aa --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,95 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js index a0834c7e2c4f9e7131ec5d3243ad2ca2010ab80b..568f333fdaacebefdaf65e5257ac653024be72e2 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..8874f7124372e255e23f4af26b24174934d1554b --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,95 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..f459ce5a89b22e7cbf5769536ac17c2bb30c6ea2 --- /dev/null +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,89 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-regular-definitions.template +/*--- +description: Valid Static PrivateName (regular fields defintion) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1 + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js index d53d2260f5af07925925da15ba2d5e3a3eb84b82..546b552552cf638b8ec8fe89b0e54633148166ff 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js index 169139c14656ad7b03c20e6d757049463fe377c9..d1a39b71b7179df49e28856c6c3bfbc296a77012 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier.js b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier.js index 9fe26d29d53da701cb4eb2ce1795d71fe4ce3fe6..6813941f1e285ab6ce692917f3ba6bab33e670a5 100644 --- a/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-regular-definitions-rs-static-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js index 684c6cde62fd5307b344ce8d7f8c594404302fdb..6bd67d046c5ca9effc3924669f6e3e62e96e2d52 100644 --- a/test/language/statements/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-same-line-async-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier-initializer.js index 96d9b0a9cd596d12e97bdbcd8e542c4e38ff833e..6906aadfa1cc01884ff322fd24e3ee40be9449ed 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier.js index 45fb9c76a739514201c3242fb640dc6b4198c164..8db7ab527ce630f24a6bc28da797ed3bd25d13ef 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js index 01b1b15be31cd4ee131fc615a266cec788deca43..316381c808b497e4889ddf14030746295135d395 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js index 1d3fef8e89d19fb8847fc5defc5d7283c1a1275c..a2d85fa4765e213c544c829764716272fe493101 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js index fe793e6a42899c6649b9420d2f53a9d305e9ac6b..71ad00009a5668f94932d9e42f4ceecb95e7e522 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier.js index 01b14182058d8976adabfe87b6831645edc22725..992843e45c49e418404cfaee5874fb8f0c201666 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..263742e08c18e10487ffa6dcc525179051c1fb69 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async *m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..c63da90036eaae82283039211522cfde4b2a5649 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async *m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..d5b17a2aa218c1784834259ee4f7cdff5e3983b1 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..448e95ffdfa458d6b394fb224cc7812505a6e1be --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,136 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async *m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..8557f9e15566e67baed8d81edead7588a0930363 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..2310df37d422de59645e96a5fdf0704e8bb9cda1 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,125 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async *m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js index 95282d0a0f4d639e2843ec6f7a16964aa6a3e9f9..3a5dbc94e589a6cbd90b084247a65266aed55aba 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { async *m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js index 63d11f1ee39d982a041c1ba37aa07eb04a9a49c2..34822c8641c3d81d51e68bc8982625ccdeeeeb25 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async generator in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-iteration] +features: [class-static-methods-private, class, class-fields-public, async-iteration] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..ff06256006bcc2879d15550bb77bac50dd813e99 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async *m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js index 6649adc9420d6e9c9df866b8b9c09d9e9644a521..5c9a05df8eb552709d2fcfd170496b2bd6d21de8 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..64fa0b3f172f3eedf0497dda9bee815e3091cf19 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,110 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async *m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..832d2cfc7923f32443b42a2d42325f485fbc9f14 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,104 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-gen.template +/*--- +description: Valid Static PrivateName (field definitions after an async generator in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-iteration] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async *m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + + +c.m().next().then(function(v) { + assert.sameValue(v.value, 42); + assert.sameValue(v.done, true); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js index 38a850f4adce700d8d2e893120e993a013e36694..15d9c9b353d9d317c7ed01e39572b0f1df7e3eef 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js index 15731e6585ec465fd619730f2af04408beca4c27..c5b703caea3fed165f852ef60a153cb6b57729ad 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier.js index 4ee4955df74bd11dcda66c8b65b4625363130f70..2c2149d586ce6aa2cacd4bc9f86efd98e7317c0e 100644 --- a/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js index 1ee7dd8fd385606fda03ea9036e991df6e7f59c7..b1a083f770c776d40fc64028b6f915f1d7abf843 100644 --- a/test/language/statements/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-same-line-async-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-method-rs-field-identifier-initializer.js index 292a5c4b39462402a2d9be22142ef51d35c16d61..e1b07b248c9cb8b4359e56f0e96a2df6035b15f7 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-field-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-field-identifier.js index fd0af86be372c6f5f66b005057ec9d66db4eb5b1..9ab607ddbfb8c46ae86e1ce919bc2a800e703515 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-alt.js index 88897a8a75d839db52368bc093877680baf876d4..a0819035aad7b52b017364f2897a772891a641ff 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js index bc7ec4d60faef7665ecc47b62bff8acf1b008d07..79ade95804cf59a7c7707e94d3ac2f0361c3a694 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js index d695c6068d53b52c650c9f6313e53791b48b34b4..35db4d8d0a29bf25421a4f45a08cd54667673c52 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier.js index d4c78171b246690acb927089c2250ab77820510c..0ff930c120efa315286cc393556f71c18d406a9b 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..1807d1e71cee63151bd04c66bace977a4d97cb46 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async m() { return 42; } static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..1d10947d305a64176ced1c52b96a7b5322670606 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async m() { return 42; } static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..bf618bbd90b253c6d9a55e9a08e20799609a698d --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,134 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..021a6ac3a53386a08de9eaa3d2c36982216d835f --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,135 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async m() { return 42; } static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..f20de2c3e529fd637483157900e3905971babcb3 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f6815bb66aef51a580f7753b0bd30dca00ff8ce5 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,124 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async m() { return 42; } static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js index 1e8d884956e707b2d63ccbf717fc2b4aa2b7d99f..ce2eda176b162196e985ff32ab252be54928c2ac 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { async m() { return 42; } static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; static $(value) { diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js index 4689824b50c2b0275e012f353a2d24f217dff3e2..2ab524d63cfa058cd25dac58cdbfa1283180cad9 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions after an async method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, async-functions] +features: [class-static-methods-private, class, class-fields-public, async-functions] flags: [generated, async] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..b24220655b5e7e84dba93b42030ee1869cc52d44 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async m() { return 42; } static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js index 874375753aa6df874c2a77babd22f1ef57f51f8c..582e865cd889f76d3b8960399566c2018973a04b 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..f5b8fc84c5b4bbdc656b7a5aac9c76dc042b8966 --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,109 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async m() { return 42; } static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..ea9823cf4b3e2f528ccff3bf00ad90d33568938f --- /dev/null +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,103 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-after-same-line-async-method.template +/*--- +description: Valid Static PrivateName (field definitions after an async method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, async-functions] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + async m() { return 42; } static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); +assert.sameValue(c.m, C.prototype.m); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}, {restore: true}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + + +c.m().then(function(v) { + assert.sameValue(v, 42); +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js index a6a4e362c6a8df2ad88f89667098336ec41d8d41..ae9e7f7b81ebcc15afa9ea5bd53f5507a82d9701 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js index fb5b87f15ca7eefd3390bc2885c3a22c6cf675f3..69aa0a43fc3cbb528164d7579d094c3bb79dfed7 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier.js index 723f1ab635fb82aa21fa01017568b8c5b3808269..0508e4fc0e54828af2a76289f02b89fc4f800133 100644 --- a/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-async-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js index 8a26a88ca078c47b20991ef878d552518d0e17ff..4cb919e79d565bf54f26f142cc0d9bdb52e787e9 100644 --- a/test/language/statements/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-same-line-gen-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-field-identifier-initializer.js b/test/language/statements/class/fields-same-line-gen-rs-field-identifier-initializer.js index 730cf1ab8fd2ced751290711ad3d07fea17c574c..426c82042a71cd9842b5283ae36686a20ca1ad0a 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-gen-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-field-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-field-identifier.js index bbb8c36526663de6d72d72cc65aded4648e7a2d6..99711c108121966ed7dcb1184493592139fbda0d 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-field-identifier.js +++ b/test/language/statements/class/fields-same-line-gen-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-alt.js index 5f6cdf2a78d081187b66380955779604c3a8d327..46ed8603b4cada298ff4de5bb648466fd42b8888 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js index ca55902848a97fa9fa9ded31f045e83f0a8d3e65..02c4fd57445ba494c01ddee4a5368a118c715281 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer.js index eb13a59e9a9cf4d29b96a9a88043f4e7d7de6178..1f9775cb938c2f1264e768624f6a035c593700cd 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier.js index ebf2311b1c0ae562f4bc8e0f5ff2a53d10fe3b09..b8ae2860f92a84a0d8fe49b5ab259288390a7152 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-gen-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..34c52e35bef9105f2c95d205c0d723c9502713f0 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; *m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..d1bf17f7d03aca9608ecf52c9399d1498c5170d8 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; *m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..6c644a85a85a6a4a930708bba149f46da8d24462 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..b292987488c9c42efb0f7c587698a8f89c805568 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; *m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..96c7fd23243388e3566bb733c545b5226f9713eb --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..7487f8a298911afbfd88901d01fa30bce36dfd78 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; *m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js index 16754b1bab6b0a35cd6ef749014f7b20eb114826..bb74a09ac4ade391e535d1596d95f79166afca65 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; *m() { return 42; } static $(value) { diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier.js index aef62fd988d991833a6ce7f06646235db231d70d..ba3900d6cae7fee3670a44cf2d97f6df60e16ce4 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a generator method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public, generators] +features: [class-static-methods-private, class, class-fields-public, generators] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..aa08600a9523085bae15b8c55392c82703623a29 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js index 3180736ccccc21ca44d6dfda2d55d8c4bc16e08a..773fb6878b8a2a4cb4fe6915643b8e2179ea5689 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..b69d69738de29a7bd69bde661848f4d167315cd4 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; *m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..966b29a56917be68f876f27260a16c558b3d85a3 --- /dev/null +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-generator.template +/*--- +description: Valid Static PrivateName (field definitions followed by a generator method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public, generators] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; *m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m().next().value, 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js index ef96d042d7776a2d37e485ca68ebc54aed2ba722..25035ef464db2d06205a7d5b3fd8d12725652381 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js index 460d9d2caf74f5f6a7eaeb45f7545e6fa2c89e1f..39cb60711ca55a18d6d4e470722bb99836f07b57 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier.js b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier.js index a217c90f539c9c2acd592d8d6c31e7fc28e4189b..7fcc9f4b0de0324d090597be01ef61015e497fcd 100644 --- a/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-gen-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js index 2d4adbcbf63d5d3e7cb1350095e8457f5a8dcca7..d77701358393f5722704bafccdada371d93216f5 100644 --- a/test/language/statements/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-same-line-method-grammar-privatename-identifier-semantics-stringvalue.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-field-identifier-initializer.js b/test/language/statements/class/fields-same-line-method-rs-field-identifier-initializer.js index 6da87a07729f406288c211cb7266106a8e31874a..4071d75c240cf5bbaa05badb5bcb5ca9ae49ba12 100644 --- a/test/language/statements/class/fields-same-line-method-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-method-rs-field-identifier-initializer.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-field-identifier.js b/test/language/statements/class/fields-same-line-method-rs-field-identifier.js index 532cf1574d0325a95ad69ad9d554beadc2eafd38..be04a9768035fce41dc2e2a8ad1fc2f31ef05b20 100644 --- a/test/language/statements/class/fields-same-line-method-rs-field-identifier.js +++ b/test/language/statements/class/fields-same-line-method-rs-field-identifier.js @@ -27,20 +27,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-alt.js index 5b8e75fe25fb49f0e61fb56d45825e708b315f6f..bf0fd0ebbcd1510a26c3f34da43e5f64c54f0adc 100644 --- a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js index d5cab7a72169c13c788e757f7e9ce0aca28941eb..4782feedb86ad501d7e1e447bf6e9eed98fdf438 100644 --- a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer.js index 99a60d4a1d9d6b6ed279bffdcb7ac831ab12c86d..f829de55adf7fe5393ade01b4f6253556dbf2bf6 100644 --- a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier.js index 0476a7283995787c0e8fbab9a4013c361c90a7f5..e9685f8dddf199a6bd61c36e13abef5d8c8f5284 100644 --- a/test/language/statements/class/fields-same-line-method-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-method-rs-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..283f4bb57c439b733426d7ab3dae3baddaad9ac9 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + }; m() { return 42; } + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..9852b31b81416bc60a3665de07a761bdb7e7f1c6 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + }; m() { return 42; } + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..04e0616d3abffbdcb795e334456cd77dee78ba0a --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,131 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + }; m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..8931afd3cddffdbf1a9339edad8d1be2cc48cb47 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,132 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static AsyncMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + }; m() { return 42; } + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..4db8cae136646c6b4b4a2ccafb3fe1680c2777ad --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,120 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + }; m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..d69787b1ddfcfc99c890f828117623f950b39bd6 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,121 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static GeneratorMethod PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + }; m() { return 42; } + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js index da60f6ade024e38b430b06b64f960f6608fb1314..6015f117eebf11d8fcac6e47c0c7dd974db3d562 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; }; m() { return 42; } static $(value) { diff --git a/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier.js index 2a8e5726c2cec8b02beeac365edce135a865e298..1ec92a2cef36c43dd29c9b7474f079760f60cf02 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (field definitions followed by a method in the same line) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] includes: [propertyHelper.js] info: | @@ -16,30 +16,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..1be9cfa4cb35448ff51e9baf7cd3399c9b717d65 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J; m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt.js index c50fc6c5c7ea73d90e223e211cd0589a9c82d500..ad9fc5fe32e6bb7364f293b84488f5fb9ab96274 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..f1c49c6b4ec85a043da1f1e71b132cadf25e44c9 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,106 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J; m() { return 42; } + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..18cd2ac394b086da72353050ff416ed85e9a7834 --- /dev/null +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,100 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-same-line-method.template +/*--- +description: Valid Static PrivateName (field definitions followed by a method in the same line) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +includes: [propertyHelper.js] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1; m() { return 42; } + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(c.m(), 42); +assert.sameValue(c.m, C.prototype.m); +assert.sameValue(Object.hasOwnProperty.call(c, "m"), false); + +verifyProperty(C.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, +}); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js index c840d5639de0d976697e8ce94d4dd2f83e9fd163..d419e8f12921f3cea3a685b2391f5ea964150114 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer-alt.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js index 5bdd621782b0f2c5af6a6d7b491e9aeb72089e16..0192cf9b07026d0f88c141f9f4b1f98b9ba9f387 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier-initializer.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier.js b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier.js index 27d499712f56876ce82db69a8c68c67ed5e02e54..3ffe384b22e1372cdaf9ff6481de27cda0e1ac14 100644 --- a/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-same-line-method-rs-static-privatename-identifier.js @@ -23,23 +23,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js b/test/language/statements/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js index b4b458afbbd6b41e8b2b19f84e6de18293348310..4a417ea30a02bda1648d563c011109af9d5a557b 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js +++ b/test/language/statements/class/fields-wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js b/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js index 0b36001dc43a076a97b5316ed2a3d3e3a1f16685..bf235849d0aee0cfa143fe479364b9ea744afad5 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier-initializer.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier.js index 9ed86d6da1fb294482c3b897a6cc8d50bc2f86d7..f146e6d7fbe0fba27952a6a24b7a501d957c1853 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-field-identifier.js @@ -26,20 +26,20 @@ info: | LiteralPropertyName : IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js index c0d6bb22dd7557f47d846dc02ebf0641ae96a77b..d261e10ee5c39d7b25fd963548e9374b9fc2b572 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js index 63f406d8f547e0d6781897a1dad64698d7779aa7..6b409945c1142799c8745190808e0825e93321a2 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer-alt.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js index 6803fd8731ccde87f611fb5369ff8a2f5da7beaf..0ef95fe37dc75b88b483b94892be684b7b9656a5 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier-initializer.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier.js index d6d84e59db330f90f2b0d1f0cf6f1b03a50570dd..c7463d4662df88a7202b345e236fbf3cd8596bfd 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..b9c70eec7fbc1b9acdf25c773702f0d1be8ae6b3 --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + ;;;; + ;;;;;;static async #$(value) { + yield await value; + } + static async #_(value) { + yield await value; + } + static async #o(value) { + yield await value; + } + static async #℘(value) { + yield await value; + } + static async #ZW_‌_NJ(value) { + yield await value; + } + static async #ZW_â€_J(value) { + yield await value; + };;;;;;; + ;;;; + static async $(value) { + yield * await this.#$(value); + } + static async _(value) { + yield * await this.#_(value); + } + static async o(value) { + yield * await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield * await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.o(1).next(), + C.℘(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1).next(), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..4955ed2681fa325a08ffb3ca8fe74d349c7ffa66 --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static AsyncGeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncGeneratorMethod + + AsyncGeneratorMethod : + async [no LineTerminator here] * ClassElementName ( UniqueFormalParameters){ AsyncGeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + ;;;; + ;;;;;;static async * #$(value) { + yield await value; + } + static async * #_(value) { + yield await value; + } + static async * #\u{6F}(value) { + yield await value; + } + static async * #\u2118(value) { + yield await value; + } + static async * #ZW_\u200C_NJ(value) { + yield await value; + } + static async * #ZW_\u200D_J(value) { + yield await value; + };;;;;;; + ;;;; + static async * $(value) { + yield * await this.#$(value); + } + static async * _(value) { + yield * await this.#_(value); + } + static async * \u{6F}(value) { + yield * await this.#\u{6F}(value); + } + static async * \u2118(value) { + yield * await this.#\u2118(value); + } + static async * ZW_\u200C_NJ(value) { + yield * await this.#ZW_\u200C_NJ(value); + } + static async * ZW_\u200D_J(value) { + yield * await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1).next(), + C._(1).next(), + C.\u{6F}(1).next(), + C.\u2118(1).next(), + C.ZW_\u200C_NJ(1).next(), + C.ZW_\u200D_J(1).next(), +]).then(results => { + + assert.sameValue(results[0].value, 1); + assert.sameValue(results[1].value, 1); + assert.sameValue(results[2].value, 1); + assert.sameValue(results[3].value, 1); + assert.sameValue(results[4].value, 1); + assert.sameValue(results[5].value, 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..17664b86befa83206ff7e0d6d2c01a2aff07053a --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier-alt.js @@ -0,0 +1,122 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + ;;;; + ;;;;;;static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #o(value) { + return await value; + } + static async #℘(value) { + return await value; + } + static async #ZW_‌_NJ(value) { + return await value; + } + static async #ZW_â€_J(value) { + return await value; + };;;;;;; + ;;;; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async o(value) { + return await this.#o(value); + } + static async ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#℘(value); + } + static async ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_‌_NJ(value); + } + static async ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + return await this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.o(1), + C.℘(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_‌_NJ(1), // DO NOT CHANGE THE NAME OF THIS FIELD + C.ZW_â€_J(1), // DO NOT CHANGE THE NAME OF THIS FIELD +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..b8905eb2257e789e398680c3f417092b24103ffe --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-async-method-privatename-identifier.js @@ -0,0 +1,123 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-async-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static AsyncMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated, async] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + AsyncMethod + + AsyncMethod : + async [no LineTerminator here] ClassElementName ( UniqueFormalParameters ){ AsyncFunctionBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + ;;;; + ;;;;;;static async #$(value) { + return await value; + } + static async #_(value) { + return await value; + } + static async #\u{6F}(value) { + return await value; + } + static async #\u2118(value) { + return await value; + } + static async #ZW_\u200C_NJ(value) { + return await value; + } + static async #ZW_\u200D_J(value) { + return await value; + };;;;;;; + ;;;; + static async $(value) { + return await this.#$(value); + } + static async _(value) { + return await this.#_(value); + } + static async \u{6F}(value) { + return await this.#\u{6F}(value); + } + static async \u2118(value) { + return await this.#\u2118(value); + } + static async ZW_\u200C_NJ(value) { + return await this.#ZW_\u200C_NJ(value); + } + static async ZW_\u200D_J(value) { + return await this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +Promise.all([ + C.$(1), + C._(1), + C.\u{6F}(1), + C.\u2118(1), + C.ZW_\u200C_NJ(1), + C.ZW_\u200D_J(1), +]).then(results => { + + assert.sameValue(results[0], 1); + assert.sameValue(results[1], 1); + assert.sameValue(results[2], 1); + assert.sameValue(results[3], 1); + assert.sameValue(results[4], 1); + assert.sameValue(results[5], 1); + +}, $DONE).then($DONE, $DONE); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js new file mode 100644 index 0000000000000000000000000000000000000000..6f6590341d067a727b6ad0cb681661fffbb13b1e --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js @@ -0,0 +1,111 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier-alt.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + ;;;; + ;;;;;;static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #o(value) { + yield value; + } + static * #℘(value) { + yield value; + } + static * #ZW_‌_NJ(value) { + yield value; + } + static * #ZW_â€_J(value) { + yield value; + };;;;;;; + ;;;; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * o(value) { + yield this.#o(value); + } + static * ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#℘(value); + } + static * ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_‌_NJ(value); + } + static * ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + yield this.#ZW_â€_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.o(1).next().value, 1); +assert.sameValue(C.℘(1).next().value, 1); +assert.sameValue(C.ZW_‌_NJ(1).next().value, 1); +assert.sameValue(C.ZW_â€_J(1).next().value, 1); diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js new file mode 100644 index 0000000000000000000000000000000000000000..864a3b405bc3594ba21377e29214c84d52004c94 --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-generator-method-privatename-identifier.js @@ -0,0 +1,112 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-generator-method-privatename-identifier.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static GeneratorMethod PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-methods-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + MethodDefinition : + GeneratorMethod + + GeneratorMethod : + * ClassElementName ( UniqueFormalParameters ){ GeneratorBody } + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + ;;;; + ;;;;;;static * #$(value) { + yield value; + } + static * #_(value) { + yield value; + } + static * #\u{6F}(value) { + yield value; + } + static * #\u2118(value) { + yield value; + } + static * #ZW_\u200C_NJ(value) { + yield value; + } + static * #ZW_\u200D_J(value) { + yield value; + };;;;;;; + ;;;; + static * $(value) { + yield this.#$(value); + } + static * _(value) { + yield this.#_(value); + } + static * \u{6F}(value) { + yield this.#\u{6F}(value); + } + static * \u2118(value) { + yield this.#\u2118(value); + } + static * ZW_\u200C_NJ(value) { + yield this.#ZW_\u200C_NJ(value); + } + static * ZW_\u200D_J(value) { + yield this.#ZW_\u200D_J(value); + } + +} + +var c = new C(); + +assert.sameValue(C.$(1).next().value, 1); +assert.sameValue(C._(1).next().value, 1); +assert.sameValue(C.\u{6F}(1).next().value, 1); +assert.sameValue(C.\u2118(1).next().value, 1); +assert.sameValue(C.ZW_\u200C_NJ(1).next().value, 1); +assert.sameValue(C.ZW_\u200D_J(1).next().value, 1); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js index 16561b43e5938c0b0292b358a19c58fa704d9eb3..ae1fa769333031153e27c1a438e7bd692a141cb1 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier-alt.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (fields definition wrapped in semicolons) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: @@ -59,27 +59,21 @@ info: | class C { ;;;; ;;;;;;static #$(value) { - this.$ = value; return value; } static #_(value) { - this.#stored = value; return value; } static #o(value) { - this.#stored = value; return value; } static #℘(value) { - this.#stored = value; return value; } static #ZW_‌_NJ(value) { - this.#stored = value; return value; } static #ZW_â€_J(value) { - this.#stored = value; return value; };;;;;;; ;;;; diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js index 8801041a422f4d431d51adbe3a669f9aacd75fcb..1b96159f87957df8b700e08811a5e495a71ed82b 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-method-privatename-identifier.js @@ -4,7 +4,7 @@ /*--- description: Valid Static Method PrivateName (fields definition wrapped in semicolons) esid: prod-FieldDefinition -features: [class-static-fields-private, class, class-fields-public] +features: [class-static-methods-private, class, class-fields-public] flags: [generated] info: | @@ -15,30 +15,30 @@ info: | static FieldDefinition ; ; - FieldDefinition : - ClassElementName Initializer _opt + MethodDefinition : + ClassElementName ( UniqueFormalParameters ){ FunctionBody } ClassElementName : PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..5c18c011d33a98b41ab0692703499ce58f3fb5ae --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt-by-classname.js @@ -0,0 +1,97 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-alt-by-classname.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + ;;;; + ;;;;;;static #$; static #_; static #\u{6F}; static #℘; static #ZW_‌_NJ; static #ZW_â€_J;;;;;;; + ;;;; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static o(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static ℘(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#℘ = value; + return C.#℘; + } + static ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_‌_NJ = value; + return C.#ZW_‌_NJ; + } + static ZW_â€_J(value) { // DO NOT CHANGE THE NAME OF THIS FIELD + C.#ZW_â€_J = value; + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.o(1), 1); +assert.sameValue(C.℘(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_‌_NJ(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD +assert.sameValue(C.ZW_â€_J(1), 1); // DO NOT CHANGE THE NAME OF THIS FIELD + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js index b17e1c0926f5c230e1d328ec51fdfdae4849bac2..7c839f76e6c31a6ae1b4eedaa027b6db7ff263b8 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..16b297b28362761cf73032231dac7afc47b9cd6a --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-by-classname.js @@ -0,0 +1,97 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-by-classname.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + ;;;; + ;;;;;;static #$; static #_; static #\u{6F}; static #\u2118; static #ZW_\u200C_NJ; static #ZW_\u200D_J;;;;;;; + ;;;; + static $(value) { + C.#$ = value; + return C.#$; + } + static _(value) { + C.#_ = value; + return C.#_; + } + static \u{6F}(value) { + C.#\u{6F} = value; + return C.#\u{6F}; + } + static \u2118(value) { + C.#\u2118 = value; + return C.#\u2118; + } + static ZW_\u200C_NJ(value) { + C.#ZW_\u200C_NJ = value; + return C.#ZW_\u200C_NJ; + } + static ZW_\u200D_J(value) { + C.#ZW_\u200D_J = value; + return C.#ZW_\u200D_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(1), 1); +assert.sameValue(C._(1), 1); +assert.sameValue(C.\u{6F}(1), 1); +assert.sameValue(C.\u2118(1), 1); +assert.sameValue(C.ZW_\u200C_NJ(1), 1); +assert.sameValue(C.ZW_\u200D_J(1), 1); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js new file mode 100644 index 0000000000000000000000000000000000000000..3cfe37c481c0d149f96d476df5f9e2445c25e885 --- /dev/null +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt-by-classname.js @@ -0,0 +1,91 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/rs-static-privatename-identifier-initializer-alt-by-classname.case +// - src/class-fields/productions/cls-decl-wrapped-in-sc.template +/*--- +description: Valid Static PrivateName (fields definition wrapped in semicolons) +esid: prod-FieldDefinition +features: [class-static-fields-private, class, class-fields-public] +flags: [generated] +info: | + + ClassElement : + MethodDefinition + static MethodDefinition + FieldDefinition ; + static FieldDefinition ; + ; + + FieldDefinition : + ClassElementName Initializer _opt + + ClassElementName : + PropertyName + PrivateName + + PrivateName :: + # IdentifierName + + IdentifierName :: + IdentifierStart + IdentifierName IdentifierPart + + IdentifierStart :: + UnicodeIDStart + $ + _ + \ UnicodeEscapeSequence + + IdentifierPart:: + UnicodeIDContinue + $ + \ UnicodeEscapeSequence + <ZWNJ> <ZWJ> + + UnicodeIDStart:: + any Unicode code point with the Unicode property "ID_Start" + + UnicodeIDContinue:: + any Unicode code point with the Unicode property "ID_Continue" + + + NOTE 3 + The sets of code points with Unicode properties "ID_Start" and + "ID_Continue" include, respectively, the code points with Unicode + properties "Other_ID_Start" and "Other_ID_Continue". + +---*/ + + +class C { + ;;;; + ;;;;;;static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW_‌_NJ = 1; static #ZW_â€_J = 1;;;;;;; + ;;;; + static $() { + return C.#$; + } + static _() { + return C.#_; + } + static \u{6F}() { + return C.#\u{6F}; + } + static ℘() { + return C.#℘; + } + static ZW_‌_NJ() { + return C.#ZW_‌_NJ; + } + static ZW_â€_J() { + return C.#ZW_â€_J; + } +} + +var c = new C(); + +assert.sameValue(C.$(), 1); +assert.sameValue(C._(), 1); +assert.sameValue(C.\u{6F}(), 1); +assert.sameValue(C.℘(), 1); +assert.sameValue(C.ZW_‌_NJ(), 1); +assert.sameValue(C.ZW_â€_J(), 1); + diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js index a680c61c5c324b4728f1c09966d25e052e052708..98d9d89daec87e6802abc33e74dc5c28567b5269 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer-alt.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js index 93b92daff4ea7b9a05ada30973d3af8bb129a4cd..e11da6abc28a384e933375a8d16bfe5e6070d612 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier-initializer.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js index 4725ed71153636179c5bad5e63a11d2f5ee1316a..6a2ace3c27442a9b6de64e053f3395bb3c75d831 100644 --- a/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js +++ b/test/language/statements/class/fields-wrapped-in-sc-rs-static-privatename-identifier.js @@ -22,23 +22,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/static-private-fields-proxy-default-handler-throws.js b/test/language/statements/class/static-private-fields-proxy-default-handler-throws.js new file mode 100644 index 0000000000000000000000000000000000000000..137797ec85a7f494c0c126140c850e0df575d93b --- /dev/null +++ b/test/language/statements/class/static-private-fields-proxy-default-handler-throws.js @@ -0,0 +1,28 @@ +// Copyright (C) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-privatefieldget +description: Static private fields not accessible via default Proxy handler +info: | + 1. Assert: P is a Private Name value. + 2. If O is not an object, throw a TypeError exception. + 3. Let entry be PrivateFieldFind(P, O). + 4. If entry is empty, throw a TypeError exception. + +features: [class, class-static-fields-private] +---*/ + +class C { + static #x = 1; + static x() { + return this.#x; + } +} + +var P = new Proxy(C, {}); + +assert.sameValue(C.x(), 1); +assert.throws(TypeError, function() { + P.x(); +}); diff --git a/test/language/statements/class/syntax-error-grammar-field-def-has-initializer-no-sc.js b/test/language/statements/class/syntax-error-grammar-field-def-has-initializer-no-sc.js deleted file mode 100644 index 4dfed1839e5fa1ec3c679d4161f630050335b152..0000000000000000000000000000000000000000 --- a/test/language/statements/class/syntax-error-grammar-field-def-has-initializer-no-sc.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-field-def-has-initializer-no-sc.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - x = [] -} diff --git a/test/language/statements/class/syntax-error-grammar-field-no-initializer-with-method.js b/test/language/statements/class/syntax-error-grammar-field-no-initializer-with-method.js deleted file mode 100644 index d4991c69f118bec78f0dbe9cf44adc6c725d7a4f..0000000000000000000000000000000000000000 --- a/test/language/statements/class/syntax-error-grammar-field-no-initializer-with-method.js +++ /dev/null @@ -1,32 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-field-no-initializer-with-method.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - x - m() {} -} diff --git a/test/language/statements/class/syntax-error-grammar-fields.js b/test/language/statements/class/syntax-error-grammar-fields.js deleted file mode 100644 index 7b0527c42feb6841b39e0c3a5f8d26777c465462..0000000000000000000000000000000000000000 --- a/test/language/statements/class/syntax-error-grammar-fields.js +++ /dev/null @@ -1,31 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-fields.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-public, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - x y -} diff --git a/test/language/statements/class/syntax-error-grammar-privatename-no-initializer-with-method.js b/test/language/statements/class/syntax-error-grammar-privatename-no-initializer-with-method.js deleted file mode 100644 index 1014356e35903f1e3f6e8c3b274edb683e511e07..0000000000000000000000000000000000000000 --- a/test/language/statements/class/syntax-error-grammar-privatename-no-initializer-with-method.js +++ /dev/null @@ -1,35 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-no-initializer-with-method.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - #x - m() {} -} diff --git a/test/language/statements/class/syntax-error-grammar-privatename.js b/test/language/statements/class/syntax-error-grammar-privatename.js deleted file mode 100644 index e92dadf3ac29e9ca128fb01f98895dbeb542b8d5..0000000000000000000000000000000000000000 --- a/test/language/statements/class/syntax-error-grammar-privatename.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - # x -} diff --git a/test/language/statements/class/syntax-error-grammar-privatenames.js b/test/language/statements/class/syntax-error-grammar-privatenames.js deleted file mode 100644 index 503031c6bd34de3a12ed8a2965a9a0d3305ffd5a..0000000000000000000000000000000000000000 --- a/test/language/statements/class/syntax-error-grammar-privatenames.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatenames.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: SyntaxError (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - #x #y -} diff --git a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js index f0a77794082b2be69d5a099bc42535acd314da66..80c3f60e822944ce7b96cf4cec2df885bf053401 100644 --- a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-ues-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-ues-error.case // - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js index 5bc7632b4da95b6de8e58e5659e2924ad887553d..dfc24344fda4c614beb7e6f677e53c6a1f8d7672 100644 --- a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwj-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-zwj-error.case // - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js index 638f1ca522bf88590285260d613257ce74cf3763..13c9558d65157307a4cd62bbe6d1ce5d306dc0f9 100644 --- a/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-field-identifier-invalid-zwnj-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-field-identifier-invalid-zwnj-error.case // - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template /*--- -description: Valid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) +description: Invalid FieldDefinition, ClassElementName, PropertyName Syntax (class declaration) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] @@ -41,12 +41,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-error.js index 7ddf73908601478a6c95e72c4793bd8bca16cca8..e7393680a5d01ecb26c22c804eda7e4280456aee 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatename-error.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-privatename-error.case // - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template /*--- -description: SyntaxError (class declaration) +description: No space allowed between sigial and IdentifierName (class declaration) esid: prod-ClassElement features: [class-fields-private, class] flags: [generated] @@ -24,7 +24,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js index 95e59adab06ded219143a89fe44fd6573f97be92..03f54da9122c8ddd7badb3778a056d6f45d40327 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-ues.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js index 052e5c8493b938ea0b9106fd74622ec65ea0c4f2..5f707a61b42e820536863d3946fef6811ad58039 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwj-error.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js index accdca3be89b41f13c1bc6a0c487e241c1b9136d..6d56613aed8baef0227556a4a0c53f44a46450ce 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-invalid-zwnj-error.js @@ -24,23 +24,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js deleted file mode 100644 index 01562653b40bb654f760f753a9db8c07d774930b..0000000000000000000000000000000000000000 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-id-start-error.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-identifier-non-id-start-error.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: Valid PrivateName Syntax (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - - IdentifierName:: - IdentifierStart - IdentifierName IdentifierPart - - IdentifierStart:: - UnicodeIDStart - $ - _ - \UnicodeEscapeSequence - - IdentifierPart:: - UnicodeIDContinue - $ - \UnicodeEscapeSequence - <ZWNJ> <ZWJ> - - UnicodeIDStart:: - any Unicode code point with the Unicode property "ID_Start" - - UnicodeIDContinue:: - any Unicode code point with the Unicode property "ID_Continue" - - - NOTE 3 - The sets of code points with Unicode properties "ID_Start" and - "ID_Continue" include, respectively, the code points with Unicode - properties "Other_ID_Start" and "Other_ID_Continue". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - #\u{00}; -} diff --git a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js b/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js deleted file mode 100644 index 5dfa380f045c0ab2b77affc4d3f16b7be468efe3..0000000000000000000000000000000000000000 --- a/test/language/statements/class/syntax-invalid-grammar-privatename-identifier-non-ues-error.js +++ /dev/null @@ -1,65 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/class-fields/grammar-privatename-identifier-non-ues-error.case -// - src/class-fields/syntax/invalid/cls-decl-fields-invalid-syntax.template -/*--- -description: Valid PrivateName Syntax (class declaration) -esid: prod-ClassElement -features: [class-fields-private, class] -flags: [generated] -negative: - phase: parse - type: SyntaxError -info: | - - ClassElement : - MethodDefinition - static MethodDefinition - FieldDefinition ; - ; - - FieldDefinition : - ClassElementName Initializer _opt - - ClassElementName : - PropertyName - PrivateName - - PrivateName:: - # IdentifierName - - IdentifierName:: - IdentifierStart - IdentifierName IdentifierPart - - IdentifierStart:: - UnicodeIDStart - $ - _ - \UnicodeEscapeSequence - - IdentifierPart:: - UnicodeIDContinue - $ - \UnicodeEscapeSequence - <ZWNJ> <ZWJ> - - UnicodeIDStart:: - any Unicode code point with the Unicode property "ID_Start" - - UnicodeIDContinue:: - any Unicode code point with the Unicode property "ID_Continue" - - - NOTE 3 - The sets of code points with Unicode properties "ID_Start" and - "ID_Continue" include, respectively, the code points with Unicode - properties "Other_ID_Start" and "Other_ID_Continue". - ----*/ - - -throw "Test262: This statement should not be evaluated."; - -class C { - #\u0000; -} diff --git a/test/language/statements/class/syntax-invalid-grammar-privatenames-same-line-error.js b/test/language/statements/class/syntax-invalid-grammar-privatenames-same-line-error.js index c76d611923040ce35cbc44bb56fb96d82796c9c0..b85fab19690964339b3c316454e81ab37cf720c9 100644 --- a/test/language/statements/class/syntax-invalid-grammar-privatenames-same-line-error.js +++ b/test/language/statements/class/syntax-invalid-grammar-privatenames-same-line-error.js @@ -24,7 +24,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer-alt.js b/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer-alt.js index dc2cccaed37939fa03e5336a1e6bc8a84d193fa8..437af898dc7c8f401263d262dd1f2a46f3b050c8 100644 --- a/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer-alt.js +++ b/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer-alt.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer.js b/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer.js index 843cd646de9b7d1248baf5531a1778e6d7297a0a..04b8fc12d996b5f8d384413523f4c8751496b0f9 100644 --- a/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer.js +++ b/test/language/statements/class/syntax-valid-grammar-field-classelementname-initializer.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-valid-grammar-field-identifier-alt.js b/test/language/statements/class/syntax-valid-grammar-field-identifier-alt.js index 23bc06720540a5294e88975525e4a94ec43f83fe..fdbab337df707b310abf49697bea3ae784eb72da 100644 --- a/test/language/statements/class/syntax-valid-grammar-field-identifier-alt.js +++ b/test/language/statements/class/syntax-valid-grammar-field-identifier-alt.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-valid-grammar-field-identifier.js b/test/language/statements/class/syntax-valid-grammar-field-identifier.js index 6100975d824f399d88e413dd2307c595a898f7ac..f7ec447dbba256053c16584b96249f43afc33fb0 100644 --- a/test/language/statements/class/syntax-valid-grammar-field-identifier.js +++ b/test/language/statements/class/syntax-valid-grammar-field-identifier.js @@ -38,12 +38,12 @@ info: | UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart :: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart :: diff --git a/test/language/statements/class/syntax-valid-grammar-fields-multi-line.js b/test/language/statements/class/syntax-valid-grammar-fields-multi-line.js index cb260398d57b808ee1d24fa79332e6c6085e79c5..61717ccc7e53253cef791f1f9f365aecc0a2b838 100644 --- a/test/language/statements/class/syntax-valid-grammar-fields-multi-line.js +++ b/test/language/statements/class/syntax-valid-grammar-fields-multi-line.js @@ -2,7 +2,7 @@ // - src/class-fields/grammar-fields-multi-line.case // - src/class-fields/syntax/valid/cls-decl-fields-valid-syntax.template /*--- -description: SyntaxError (class declaration) +description: Valid multi-line, multi-field (class declaration) esid: prod-ClassElement features: [class-fields-public, class] flags: [generated] diff --git a/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js b/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js index 76f969b204ba58fac5f7b4a2ce52c3e98d6307f1..221df0069c327609c8b5a635393cd75e0e073460 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js +++ b/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer-alt.js @@ -21,26 +21,26 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName Initializer : = AssignmentExpression - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer.js b/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer.js index 3f97f1e0a3746f5e0fa9ef8eddb66a29d057c9ab..4c0e2d3b99cc2130bbb0df392962abcf9bbcef06 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer.js +++ b/test/language/statements/class/syntax-valid-grammar-privatename-classelementname-initializer.js @@ -21,26 +21,26 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName Initializer : = AssignmentExpression - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-valid-grammar-privatename-identifier.js b/test/language/statements/class/syntax-valid-grammar-privatename-identifier.js index dfe6c3703c3c578ab9680b2f1913d2b6ffe0b5de..39ba28c38692e6cafc90083299390c021bda172b 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatename-identifier.js +++ b/test/language/statements/class/syntax-valid-grammar-privatename-identifier.js @@ -21,23 +21,23 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName - IdentifierName:: + IdentifierName :: IdentifierStart IdentifierName IdentifierPart - IdentifierStart:: + IdentifierStart :: UnicodeIDStart $ _ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence IdentifierPart:: UnicodeIDContinue $ - \UnicodeEscapeSequence + \ UnicodeEscapeSequence <ZWNJ> <ZWJ> UnicodeIDStart:: diff --git a/test/language/statements/class/syntax-valid-grammar-privatename-no-initializer-with-method.js b/test/language/statements/class/syntax-valid-grammar-privatename-no-initializer-with-method.js index 93b9728f6cca572693430312c5b7bee9b8ddbd92..0c00168f84d4caf132b9ddcf92b2beeef1268509 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatename-no-initializer-with-method.js +++ b/test/language/statements/class/syntax-valid-grammar-privatename-no-initializer-with-method.js @@ -21,7 +21,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/ diff --git a/test/language/statements/class/syntax-valid-grammar-privatenames-multi-line.js b/test/language/statements/class/syntax-valid-grammar-privatenames-multi-line.js index 0bef1fab1a8ae96ce0639b057dfa948a3e2277bf..816f519ee6f46e69111203c1ea26231b58a69644 100644 --- a/test/language/statements/class/syntax-valid-grammar-privatenames-multi-line.js +++ b/test/language/statements/class/syntax-valid-grammar-privatenames-multi-line.js @@ -21,7 +21,7 @@ info: | PropertyName PrivateName - PrivateName:: + PrivateName :: # IdentifierName ---*/