diff --git a/test/language/expressions/class/elements/private-method-shadowed-by-getter-on-nested-class.js b/test/language/expressions/class/elements/private-method-shadowed-by-getter-on-nested-class.js index b7053de512..72320a1be4 100644 --- a/test/language/expressions/class/elements/private-method-shadowed-by-getter-on-nested-class.js +++ b/test/language/expressions/class/elements/private-method-shadowed-by-getter-on-nested-class.js @@ -42,3 +42,6 @@ assert.sameValue(c.method(), 'outer class'); assert.throws(TypeError, function() { innerB.method(c); }, 'accessed inner class getter from an object of outer class'); +assert.throws(TypeError, function() { + C.prototype.method.call(innerB); +}); diff --git a/test/language/statements/class/elements/private-method-shadowed-by-getter-on-nested-class.js b/test/language/statements/class/elements/private-method-shadowed-by-getter-on-nested-class.js index b32d61e661..4a25c348b4 100644 --- a/test/language/statements/class/elements/private-method-shadowed-by-getter-on-nested-class.js +++ b/test/language/statements/class/elements/private-method-shadowed-by-getter-on-nested-class.js @@ -42,3 +42,6 @@ assert.sameValue(c.method(), 'outer class'); assert.throws(TypeError, function() { innerB.method(c); }, 'accessed inner class getter from an object of outer class'); +assert.throws(TypeError, function() { + C.prototype.method.call(innerB); +});