✗
Failing This test is currently failing.
Failed: error-output
Failure Output
error[PARSE003]: single field in braces - use identity syntax '| ok i32' instead of '| ok { value: i32 }'
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_143_single_field_sole_branch_advises_bare_return/input.kz:6:4
|
6 | | ok { value: i32 }
| ^ Code
// Pins the ADVICE for a SOLE single-field-struct branch. A single output is the
// bare-return form `-> T`; the identity form `| ok T` a naive message might
// suggest is itself illegal for a lone branch, so pointing there is a two-hop
// path. Intent: this diagnostic lands the user on `-> i32` in ONE hop.
~event compute {}
| ok { value: i32 }
Must fail at frontend compile:
Parsing or type-checking must reject the program.
Test Configuration
Expected Error:
bare return