js/src/tests/test262/language/statements/class/elements/wrapped-in-sc-rs-private-method-alt.js
raw symbols SCIP| 1 | // This file was procedurally generated from the following sources: |
| 2 | // - src/class-elements/rs-private-method-alt.case |
| 3 | // - src/class-elements/productions/cls-decl-wrapped-in-sc.template |
| 4 | /*--- |
| 5 | description: Valid PrivateName as private method (fields definition wrapped in semicolons) |
| 6 | esid: prod-FieldDefinition |
| 7 | features: [class-methods-private, class-fields-private, class, class-fields-public] |
| 8 | flags: [generated] |
| 9 | info: | |
| 10 | ClassElement : |
| 11 | MethodDefinition |
| 12 | ... |
| 13 | ; |
| 14 | |
| 15 | MethodDefinition : |
| 16 | ClassElementName ( UniqueFormalParameters ) { FunctionBody } |
| 17 | ... |
| 18 | |
| 19 | ClassElementName : |
| 20 | PropertyName |
| 21 | PrivateName |
| 22 | |
| 23 | PrivateName :: |
| 24 | # IdentifierName |
| 25 | |
| 26 | IdentifierName :: |
| 27 | IdentifierStart |
| 28 | IdentifierName IdentifierPart |
| 29 | |
| 30 | IdentifierStart :: |
| 31 | UnicodeIDStart |
| 32 | $ |
| 33 | _ |
| 34 | \ UnicodeEscapeSequence |
| 35 | |
| 36 | IdentifierPart:: |
| 37 | UnicodeIDContinue |
| 38 | $ |
| 39 | \ UnicodeEscapeSequence |
| 40 | <ZWNJ> <ZWJ> |
| 41 | |
| 42 | UnicodeIDStart:: |
| 43 | any Unicode code point with the Unicode property "ID_Start" |
| 44 | |
| 45 | UnicodeIDContinue:: |
| 46 | any Unicode code point with the Unicode property "ID_Continue" |
| 47 | |
| 48 | NOTE 3 |
| 49 | The sets of code points with Unicode properties "ID_Start" and |
| 50 | "ID_Continue" include, respectively, the code points with Unicode |
| 51 | properties "Other_ID_Start" and "Other_ID_Continue". |
| 52 | |
| 53 | ---*/ |
| 54 | |
| 55 | |
| 56 | class C { |
| 57 | ;;;; |
| 58 | ;;;;;;#$_; #__; #\u{6F}_; #℘_; #ZW__NJ_; #ZW__J_; |
| 59 | #$() { |
| 60 | return this.#$_; |
| 61 | } |
| 62 | #_() { |
| 63 | return this.#__; |
| 64 | } |
| 65 | #\u{6F}() { |
| 66 | return this.#\u{6F}_; |
| 67 | } |
| 68 | #℘() { |
| 69 | return this.#℘_; |
| 70 | } |
| 71 | #ZW__NJ() { |
| 72 | return this.#ZW__NJ_; |
| 73 | } |
| 74 | #ZW__J() { |
| 75 | return this.#ZW__J_; |
| 76 | } |
| 77 | ;;;;;;; |
| 78 | ;;;; |
| 79 | $(value) { |
| 80 | this.#$_ = value; |
| 81 | return this.#$(); |
| 82 | } |
| 83 | _(value) { |
| 84 | this.#__ = value; |
| 85 | return this.#_(); |
| 86 | } |
| 87 | \u{6F}(value) { |
| 88 | this.#\u{6F}_ = value; |
| 89 | return this.#\u{6F}(); |
| 90 | } |
| 91 | ℘(value) { |
| 92 | this.#℘_ = value; |
| 93 | return this.#℘(); |
| 94 | } |
| 95 | ZW__NJ(value) { |
| 96 | this.#ZW__NJ_ = value; |
| 97 | return this.#ZW__NJ(); |
| 98 | } |
| 99 | ZW__J(value) { |
| 100 | this.#ZW__J_ = value; |
| 101 | return this.#ZW__J(); |
| 102 | } |
| 103 | |
| 104 | } |
| 105 | |
| 106 | var c = new C(); |
| 107 | |
| 108 | assert.sameValue(c.$(1), 1); |
| 109 | assert.sameValue(c._(1), 1); |
| 110 | assert.sameValue(c.\u{6F}(1), 1); |
| 111 | assert.sameValue(c.℘(1), 1); |
| 112 | assert.sameValue(c.ZW__NJ(1), 1); |
| 113 | assert.sameValue(c.ZW__J(1), 1); |
| 114 | |
| 115 | reportCompare(0, 0); |