✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: ImmediateImpl.location names the `name =>` head line. A refusal
// that reads it raw — here KORU021 for a branch the tor never declared —
// lands its caret on the author's impl line.
import std/io
tor f { a: i64 }
| done { x: i64, y: i64 }
| fail
f => oops { x: a, y: a }
f(a: 1)
| done d |> std/io:print.ln("{{ d.x:d }} {{ d.y:d }}")
| fail |> std/io:print.ln("f")
Actual compiler output
error[KORU021]: tor 'f' has no branch 'oops'
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_260_ctor_impl_caret_on_head/input.k:10:0
|
10 | f => oops { x: a, y: a }
| ^
hint: declared branches are: done, failFrontend must reject with:
CONTAINS error[KORU021]
CONTAINS has no branch 'oops'
ERROR_AT 10Flows
flow ~f click a branch to expand · @labels scroll to their anchor
f (a: 1)
Test Configuration
MUST_ERROR