ladybird/Libraries/LibJS/Tests/for-loop-per-iteration-env-bug.js

12 lines
224 B
JavaScript

test("check that codegen doesn't crash", () => {
function func(x) {
expect(x()).toBe(0);
}
function go() {
for (let i = 0; ; ) {
func(() => i);
break;
}
}
});