110 effect branch single void cross target

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

hits=1

Expected output

✓ Zig✓ JavaScript
hits=1
Emitted JavaScript source
let hits = 0;
const main_module = {
  ticker_event: {
    handler(input, H) {
      const tick = H.tick;
      const n = input.n;
      for (let i = 0; i < n; i++) {
      tick(i);
      }
    },
  },
  onTick_event: {
    handler(input) {
      const i = input.i;
      hits = hits + 1;
    },
  },
  report_event: {
    handler(input) {
      console.log("hits=" + hits);
    },
  },
  flow0() {
    const __arg_0 = 1;
    {
      const n = __arg_0;
      for (let i = 0; i < n; i++) {
      {
        {
          hits = hits + 1;
        }
      }
      }    }
  },
  flow1() {
    {
      console.log("hits=" + hits);
    }
  },
};
main_module.flow0();
main_module.flow1();

Test Configuration

MUST_RUN