| let assert = Object.assign( |
| function assert(expr, message = "") { |
| throw new Error(`Expected ${message || "expr"} to be true, but was ${expr}`); |
| if (a === b || (a === a && b === b) || (a !== a && b !== b)) |
| throw new Error(`Expected ${a} to be ${b}`); |
| class PrivateFieldAfterPreventExtensions extends Base { |
| #i = (Object.freeze(this), 42); |
| #assert = (assert(Object.isFrozen(this), "Object.isFrozen(this)"), this.#i + 1); |
| get() { return this.#i; } |
| let c = new PrivateFieldAfterPreventExtensions; |
| assert.equals(c.get(), 42); |
| assert.equals(c.get(), i); |
| for (var i = 0; i < 200; ++i) |