blob: 771c6856b38d5ac9cb6898ede145ae4bcbaa5a9d [file] [log] [blame]
function assert(b) {
if (!b)
throw new Error;
}
class C {
#y;
#method() { return 44; }
constructor() {
this.#y = 42;
}
a() { return eval('this.#y;'); }
b() { return eval('this.#method();'); }
}
for (let i = 0; i < 1000; ++i) {
let c = new C;
assert(c.a() === 42);
assert(c.b() === 44);
}