1 2 3 4 5 6 7 8 9 10 11 12
// |jit-test| --enable-private-methods; class C { #x() { } constructor() { this.#x = 1; } } try { new C } catch (e) { assertEq(e.message, "#x is read-only") }