Skip to content
Snippets Groups Projects
Commit af77d964 authored by Leo Balter's avatar Leo Balter Committed by Rick Waldron
Browse files

Add memberexpression and call expression forms to access private names

parent 7be4e99f
No related branches found
No related tags found
No related merge requests found
......@@ -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');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
/*{ 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');
assert.sameValue(typeof this.#m, 'function');
assert.sameValue(this.ref, this.#m, 'returns the same value');
assert.sameValue(this.#m, (() => this)().#m, 'memberexpression and call expression forms');
/*{ constructor }*/
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment