✓
Passing Passing: the compiler rejects this program as expected.
Code
// One `{ ... }` produce stage per `! each` arm: `{ f } { g }` is refused
// until the stage-list grammar lands — each `{ }` replaces the downstream
// scope, so a second stage is a different grammar than two adjacent braces
// suggest.
import std/io
for(1..4)
! each i { double: i * 2 } { triple: double * 3 } |> std/io:print.ln("{{ triple:d }}")
Actual compiler output
error[PARSE001]: Second projection stage in one arm — one `{ ... }` produce per `! each` arm for now.
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_331_each_second_projection_refused/input.k:8:6
|
8 | ! each i { double: i * 2 } { triple: double * 3 } |> std/io:print.ln("{{ triple:d }}")
| ^Frontend must reject with:
CONTAINS error[PARSE001]
CONTAINS Second projection stage
NOT_CONTAINS output_emitted.zigTest Configuration
MUST_ERROR