diff --git a/src/class-elements/private-methods/cls-decl.template b/src/class-elements/private-methods/cls-decl.template index 8ef950e3cd789ea5b87600f5c4baf70d8043954d..3bc828c84cf5b8673b98048dc5e2d8b692a96578 100644 --- a/src/class-elements/private-methods/cls-decl.template +++ b/src/class-elements/private-methods/cls-decl.template @@ -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 }*/ } diff --git a/src/class-elements/private-methods/cls-expr.template b/src/class-elements/private-methods/cls-expr.template index dd301c9065820bfc176a65446319e426b599b493..564e50acb34d938e38a24f29428e884e7c6553e9 100644 --- a/src/class-elements/private-methods/cls-expr.template +++ b/src/class-elements/private-methods/cls-expr.template @@ -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 }*/ }