| 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 |
var C = class { |
| 27 |
;;;; |
| 28 |
;;;;;;#x; #y;;;;;;; |
| 29 |
;;;; |
| 30 |
x() { |
| 31 |
this.#x = 42; |
| 32 |
return this.#x; |
| 33 |
} |
| 34 |
y() { |
| 35 |
this.#y = 43; |
| 36 |
return this.#y; |
| 37 |
} |
| 38 |
} |
| 39 |
|
| 40 |
var c = new C(); |
| 41 |
|
| 42 |
|
| 43 |
assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#x"), "test 1"); |
| 44 |
assert(!Object.prototype.hasOwnProperty.call(C, "#x"), "test 2"); |
| 45 |
assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 3"); |
| 46 |
|
| 47 |
assert(!Object.prototype.hasOwnProperty.call(C.prototype, "#y"), "test 4"); |
| 48 |
assert(!Object.prototype.hasOwnProperty.call(C, "#y"), "test 5"); |
| 49 |
assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 6"); |
| 50 |
|
| 51 |
|
| 52 |
assert.sameValue(c.x(), 42, "test 7"); |
| 53 |
assert.sameValue(c.y(), 43, "test 8"); |
| 54 |
|
| 55 |
|
| 56 |
assert(!Object.prototype.hasOwnProperty.call(c, "#x"), "test 9"); |
| 57 |
assert(!Object.prototype.hasOwnProperty.call(c, "#y"), "test 10"); |
| 58 |
|
| 59 |
reportCompare(0, 0); |