js/src/tests/test262/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js
raw symbols SCIP| 1 | // This file was procedurally generated from the following sources: |
| 2 | // - src/class-elements/rs-static-privatename-identifier-initializer-alt-by-classname.case |
| 3 | // - src/class-elements/productions/cls-decl-regular-definitions.template |
| 4 | /*--- |
| 5 | description: Valid Static PrivateName (regular fields defintion) |
| 6 | esid: prod-FieldDefinition |
| 7 | features: [class-static-fields-private, class, class-fields-public] |
| 8 | flags: [generated] |
| 9 | info: | |
| 10 | ClassElement : |
| 11 | MethodDefinition |
| 12 | static MethodDefinition |
| 13 | FieldDefinition ; |
| 14 | static FieldDefinition ; |
| 15 | ; |
| 16 | |
| 17 | FieldDefinition : |
| 18 | ClassElementName Initializer _opt |
| 19 | |
| 20 | ClassElementName : |
| 21 | PropertyName |
| 22 | PrivateName |
| 23 | |
| 24 | PrivateName :: |
| 25 | # IdentifierName |
| 26 | |
| 27 | IdentifierName :: |
| 28 | IdentifierStart |
| 29 | IdentifierName IdentifierPart |
| 30 | |
| 31 | IdentifierStart :: |
| 32 | UnicodeIDStart |
| 33 | $ |
| 34 | _ |
| 35 | \ UnicodeEscapeSequence |
| 36 | |
| 37 | IdentifierPart:: |
| 38 | UnicodeIDContinue |
| 39 | $ |
| 40 | \ UnicodeEscapeSequence |
| 41 | <ZWNJ> <ZWJ> |
| 42 | |
| 43 | UnicodeIDStart:: |
| 44 | any Unicode code point with the Unicode property "ID_Start" |
| 45 | |
| 46 | UnicodeIDContinue:: |
| 47 | any Unicode code point with the Unicode property "ID_Continue" |
| 48 | |
| 49 | |
| 50 | NOTE 3 |
| 51 | The sets of code points with Unicode properties "ID_Start" and |
| 52 | "ID_Continue" include, respectively, the code points with Unicode |
| 53 | properties "Other_ID_Start" and "Other_ID_Continue". |
| 54 | |
| 55 | ---*/ |
| 56 | |
| 57 | |
| 58 | class C { |
| 59 | static #$ = 1; static #_ = 1; static #\u{6F} = 1; static #℘ = 1; static #ZW__NJ = 1; static #ZW__J = 1 |
| 60 | static $() { |
| 61 | return C.#$; |
| 62 | } |
| 63 | static _() { |
| 64 | return C.#_; |
| 65 | } |
| 66 | static \u{6F}() { |
| 67 | return C.#\u{6F}; |
| 68 | } |
| 69 | static ℘() { |
| 70 | return C.#℘; |
| 71 | } |
| 72 | static ZW__NJ() { |
| 73 | return C.#ZW__NJ; |
| 74 | } |
| 75 | static ZW__J() { |
| 76 | return C.#ZW__J; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | var c = new C(); |
| 81 | |
| 82 | assert.sameValue(C.$(), 1); |
| 83 | assert.sameValue(C._(), 1); |
| 84 | assert.sameValue(C.\u{6F}(), 1); |
| 85 | assert.sameValue(C.℘(), 1); |
| 86 | assert.sameValue(C.ZW__NJ(), 1); |
| 87 | assert.sameValue(C.ZW__J(), 1); |
| 88 | |
| 89 | |
| 90 | reportCompare(0, 0); |