1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
function g1() { throw 10; } function g2() { throw 20; } class A { #x = "hello" + g1(); constructor(o = g2()) { } }; var thrown; try { new A; } catch (e) { thrown = e; } assertEq(thrown, 10); if (typeof reportCompare === "function") reportCompare(true, true);