blob: 2d32e5ae49f767028395555c817e96c540a28e2a [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
class C {
#field;
m(object) {
object.#field ??= 44;
return this.#field;
}
}
let c = new C();
shouldBe(c.m(c), 44);