✓
Passing This code compiles and runs correctly.
Code
// Two unguarded `!` handlers for the same effect are multicast (subscribe),
// not exclusive "else" ambiguity. Language allows it; emission fires both.
// (branch_checker already: effect links may repeat; KORU051 was wrongly
// treating them as too-many-elses. Contrast `|` outcomes, which stay exclusive.)
import std/io
pub tor ticker { n: usize }
! tick usize
proc ticker|zig {
var i: usize = 0;
while (i < n) : (i += 1) {
tick(i);
}
}
ticker(n: 2)
! tick i |> std/io:print.ln("a {{ i:d }}")
! tick i |> std/io:print.ln("b {{ i:d }}")
Actual
a 0
b 0
a 1
b 1
Expected output
a 0
b 0
a 1
b 1
Flows
flow ~ticker click a branch to expand · @labels scroll to their anchor
ticker (n: 2)
Test Configuration
MUST_RUN