✓
Passing This code compiles and runs correctly.
Code
// Flag-present half: the gated `=>` override survives and the error arm
// runs, printing BOOM boom instead of the default 42.
import std/io
import app/test_lib/override
[abstract] tor calc { n: i64 }
| ok i64
| error string
calc => ok 42
calc(n: 21)
| ok v |> std/io:print.ln("{{ v:d }}")
| error e |> std/io:print.ln("BOOM {{ e:s }}")
Supporting Files
// Same override module as 310_128: unconditional import, gated item.
import std/compiler
std/compiler:flag.declare {
"name": "my-flag",
"description": "Enable the gated calc branch override (=> pin)",
"type": "boolean"
}
[flag(my-flag)]input:calc => error "boom"
Actual
BOOM boom
Expected output
BOOM boom
Flows
flow ~calc click a branch to expand · @labels scroll to their anchor
calc (n: 21)
Test Configuration
MUST_RUN
Compiler Flags:
--my-flag