✓
Passing This code compiles and runs correctly.
Code
// Pins that a single-field-struct branch in a MULTI-branch event is guided to
// the identity form `| ok T` (drop the redundant braces) — the single-branch
// collapse to bare-return does NOT apply here, two branches are a real tag
// union. Guards that the sole-branch advice fix does not regress this case.
~event compute {}
| ok { value: i32 }
| err []const u8
Must fail at frontend compile:
Parsing or type-checking must reject the program.
Test Configuration
Expected Error:
use identity