blob: 0b2157d2f6c373e898ebe145d081e6c0852ee480 [file] [log] [blame]
let assert = {
sameValue: function (lhs, rhs) {
if (lhs !== rhs)
throw new Error("Expected: " + rhs + " bug got: " + lhs);
}
};
(function () {
class C {
#m() { return 'test'; }
field = eval('this.#m()');
}
let c = new C();
assert.sameValue(c.field, 'test');
})();
(function () {
class C {
get #m() { return 'test'; }
field = eval('this.#m');
}
let c = new C();
assert.sameValue(c.field, 'test');
})();