for-loop-per-iteration-env-bug.js 224 B

123456789101112
  1. test("check that codegen doesn't crash", () => {
  2. function func(x) {
  3. expect(x()).toBe(0);
  4. }
  5. function go() {
  6. for (let i = 0; ; ) {
  7. func(() => i);
  8. break;
  9. }
  10. }
  11. });