mirror of https://github.com/tc39/test262.git
Add memberexpression and call expression forms to access private names
This commit is contained in:
parent
7be4e99f80
commit
af77d96453
|
@ -90,6 +90,7 @@ class C {
|
||||||
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
|
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
|
||||||
assert.sameValue(typeof this.#m, 'function');
|
assert.sameValue(typeof this.#m, 'function');
|
||||||
assert.sameValue(this.ref, this.#m, 'returns the same value');
|
assert.sameValue(this.ref, this.#m, 'returns the same value');
|
||||||
|
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
|
||||||
|
|
||||||
/*{ constructor }*/
|
/*{ constructor }*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,7 @@ var C = class {
|
||||||
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
|
hasProp(this, '#m', false, 'private methods are defined in an special internal slot and cannot be found as own properties');
|
||||||
assert.sameValue(typeof this.#m, 'function');
|
assert.sameValue(typeof this.#m, 'function');
|
||||||
assert.sameValue(this.ref, this.#m, 'returns the same value');
|
assert.sameValue(this.ref, this.#m, 'returns the same value');
|
||||||
|
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
|
||||||
|
|
||||||
/*{ constructor }*/
|
/*{ constructor }*/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue