✓
Passing This code compiles and runs correctly.
Code
// Test 210_093: multi-arm effect-branch decl — SINGLE-LINE form (parse-accept).
//
// The unindented shorthand for the indented form (210_092). `|` arms riding the
// `!` line ARE that effect's resume sum; unambiguous because the event's
// terminal branches live on their own lines at base indent:
//
// ! ask i32 | halved i32 | timeout <- `ask` yields i32, resumes with
// one of {halved i32, timeout}
// | done i32 <- terminal branch (base indent)
//
// Both spellings collapse to the SAME AST (modulo source locations): an effect
// branch `ask` carrying a flat resume sum of arms [halved i32, timeout], plus a
// terminal branch `done`. This pin and 210_092 share identical `branches`
// structure — that equivalence IS the thing being pinned.
//
// PINNED FAILING (parse-accept): same gap as 210_092 — the flat decl-branch
// collection doesn't yet peel same-line `|` arms into the preceding `!`'s
// resume sum.
~pub event request { payload: i32 }
! ask i32 | halved i32 | timeout
| done i32
Expected AST
{
"module_annotations": [],
"items": [
{
"type": "import_decl",
"path": "std/compiler",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 2,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 2,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 3,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 4,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 5,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 6,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 7,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 8,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 9,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 10,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 11,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 12,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 13,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 14,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 15,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 16,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 17,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 18,
"col": 0
}
},
{
"type": "host_line",
"module": "input",
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 19,
"col": 0
}
},
{
"type": "event_decl",
"name": "request",
"path": [
"request"
],
"module": "input",
"input": {
"fields": [
{
"name": "payload",
"type": "i32",
"is_source": false,
"is_file": false,
"is_embed_file": false,
"is_expression": false,
"is_invocation_meta": false,
"phantom": null
}
]
},
"branches": [
{
"name": "ask",
"kind": "effect",
"resume": null,
"resume_phantom": null,
"resume_arms": [
{
"name": "halved",
"type": "i32",
"phantom": null
},
{
"name": "timeout",
"type": null,
"phantom": null
}
],
"is_optional": false,
"is_panic": false,
"payload": {
"fields": [
{
"name": "__type_ref",
"type": "i32",
"is_source": false,
"is_file": false,
"is_embed_file": false,
"is_expression": false,
"is_invocation_meta": false,
"phantom": null
}
]
}
},
{
"name": "done",
"kind": "terminal",
"resume": null,
"resume_phantom": null,
"is_optional": false,
"is_panic": false,
"payload": {
"fields": [
{
"name": "__type_ref",
"type": "i32",
"is_source": false,
"is_file": false,
"is_embed_file": false,
"is_expression": false,
"is_invocation_meta": false,
"phantom": null
}
]
}
}
],
"location": {
"file": "tests/regression/200_COMPILER_FEATURES/210_PARSER/210_093_effect_multi_arm_decl_single_line/input.kz",
"line": 23,
"col": 0
}
}
]
}Test Configuration
PARSER_TEST