✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: an effect-arm line (`! name …`) at top level has no construct to
// continue — it is the stray continuation KORU010 names, same as a
// top-level `|` arm. Nothing claims the line, so it must be refused at the
// line as written rather than emitted where the backend has to guess.
import std/io
! whatever b |> std/io:print.ln("x")
Actual compiler output
error[KORU010]: stray continuation line without Koru construct
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_301_stray_effect_arm_line_refused_dot_k/input.k:7:1
|
7 | ! whatever b |> std/io:print.ln("x")
| ^
hint: blank lines end a chain — the construct at line 5 cannot be continued across one. Remove the blank line, or start a new flow here. (a `! name` line is an obligation arm — it attaches to the construct directly above it)Frontend must reject with:
CONTAINS error[KORU010]
CONTAINS stray continuation
ERROR_AT 7
NOT_CONTAINS output_emitted.zigTest Configuration
MUST_ERROR