✓
Passing This code compiles and runs correctly.
Code
// Pins the item gate on a `=>` branch-constructor override, flag-absent
// half. `=>` immediate impls dropped their annotations at construction
// (the hole this test guards); with the gate seeing them, the override
// drops and the same-file default answers 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 module shape as 310_126, but the gated item is a `=>`
// branch-constructor override — the demo's exact spelling.
~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
42
Expected output
42
Flows
flow ~calc click a branch to expand · @labels scroll to their anchor
calc (n: 21)
Test Configuration
MUST_RUN