summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1602392.js
blob: e3e71bfc6364b2a14ed25081e9b3bd6c3b7677be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// |jit-test| error:ReferenceError: iter is not defined
var g = newGlobal({newCompartment: true});
g.parent = this;
g.eval("new Debugger(parent).onExceptionUnwind = function () {};");
function* f1() {
    for (const x of iter) {
        yield x;
    }
}
function f2() {
    for (var i of [1, 2, 3]) {
        for (var j of [4, 5, 6]) {
            for (const k of f1()) {
                break;
            }
        }
    }
}
f2();