1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
let hit = false; function f() { hit = true; } class C { #f = 1; static m(x) { x.#f = f(); // f() should be called before the brand check for x.#f } } try { C.m({}); // throws a TypeError } catch { } assertEq(hit, true);