summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/class-08.js
blob: 89c7ccc22d3e6388aaa64289675354c2ff0bb584 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
let g = newGlobal();
let dbg = Debugger(g);
dbg.onDebuggerStatement = function() {
    // Force the constructor to return undefined, which should be replaced with
    // |this| if the latter has been initialized.
    return { return: undefined };
}

assertEq(g.eval(`
    new (class extends class {} {
        constructor() { super(); this.foo = 42; debugger; }
    })
`).foo, 42);