| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
class C { |
| 59 |
#$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_; |
| 60 |
get #$() { |
| 61 |
return this.#$_; |
| 62 |
} |
| 63 |
get #_() { |
| 64 |
return this.#__; |
| 65 |
} |
| 66 |
get #\u{6F}() { |
| 67 |
return this.#\u{6F}_; |
| 68 |
} |
| 69 |
get #\u2118() { |
| 70 |
return this.#\u2118_; |
| 71 |
} |
| 72 |
get #ZW_\u200C_NJ() { |
| 73 |
return this.#ZW_\u200C_NJ_; |
| 74 |
} |
| 75 |
get #ZW_\u200D_J() { |
| 76 |
return this.#ZW_\u200D_J_; |
| 77 |
} |
| 78 |
; |
| 79 |
m() { return 42; } |
| 80 |
$(value) { |
| 81 |
this.#$_ = value; |
| 82 |
return this.#$; |
| 83 |
} |
| 84 |
_(value) { |
| 85 |
this.#__ = value; |
| 86 |
return this.#_; |
| 87 |
} |
| 88 |
\u{6F}(value) { |
| 89 |
this.#\u{6F}_ = value; |
| 90 |
return this.#\u{6F}; |
| 91 |
} |
| 92 |
\u2118(value) { |
| 93 |
this.#\u2118_ = value; |
| 94 |
return this.#\u2118; |
| 95 |
} |
| 96 |
ZW_\u200C_NJ(value) { |
| 97 |
this.#ZW_\u200C_NJ_ = value; |
| 98 |
return this.#ZW_\u200C_NJ; |
| 99 |
} |
| 100 |
ZW_\u200D_J(value) { |
| 101 |
this.#ZW_\u200D_J_ = value; |
| 102 |
return this.#ZW_\u200D_J; |
| 103 |
} |
| 104 |
|
| 105 |
} |
| 106 |
|
| 107 |
var c = new C(); |
| 108 |
|
| 109 |
assert.sameValue(c.m(), 42); |
| 110 |
assert.sameValue(c.m, C.prototype.m); |
| 111 |
assert( |
| 112 |
!Object.prototype.hasOwnProperty.call(c, "m"), |
| 113 |
"m doesn't appear as an own property on the C instance" |
| 114 |
); |
| 115 |
|
| 116 |
verifyProperty(C.prototype, "m", { |
| 117 |
enumerable: false, |
| 118 |
configurable: true, |
| 119 |
writable: true, |
| 120 |
}); |
| 121 |
|
| 122 |
assert.sameValue(c.$(1), 1); |
| 123 |
assert.sameValue(c._(1), 1); |
| 124 |
assert.sameValue(c.\u{6F}(1), 1); |
| 125 |
assert.sameValue(c.\u2118(1), 1); |
| 126 |
assert.sameValue(c.ZW_\u200C_NJ(1), 1); |
| 127 |
assert.sameValue(c.ZW_\u200D_J(1), 1); |
| 128 |
|
| 129 |
reportCompare(0, 0); |