blob: da897d4674d18aac7e7898ba093b47c8fca7a05f [file] [log] [blame]
let assert = {
sameValue: function (lhs, rhs) {
if (lhs !== rhs)
throw new Error("Expected: " + lhs + " bug got: " + rhs);
}
};
class C {
#m() { return this._v; }
getPrivateMethod() {
return this.#m;
}
}
let c = new C();
let o1 = {_v: 'test262'};
let o2 = {_v: 'foo'};
assert.sameValue(c.getPrivateMethod().call(o1), 'test262');
assert.sameValue(c.getPrivateMethod().call(o2), 'foo');