You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parser: a body introducer ':' at end of line followed by an unindented line takes that line as the body (§29.13) #1391
§29.13: "A colon at end of line with nothing following (no indented block) is a syntax error." Parser.parse_block_or_expr (src/Parser.w) takes the block's column from whatever statement follows the newline and never compares it with the introducing construct's indentation, so a following statement at the same (or a shallower) column becomes the body.
Actual (seed and stage1 of a7e2004): the rest of the function is parsed as the if body, and the diagnostics are about the consequences, not the cause:
error: unreachable code
error: if expression requires an else branch unless the then branch diverges
error: missing return
while c: / for / fn bodies behave the same. Expected: one parse error at the colon, "expected an indented block". The let-else else: form had the same shape and there it was silent (let Some(v) = o else: followed by return v at the let's column compiled and ran); #1382's PR gives let-else the check locally (parse_let_else_body), which is where the rest of the constructs need it too — parse_block_or_expr needs the introducing construct's column to do it in one place.
Activity
Parser: a body opened at end of line must sit deeper than its constru…
Parser: a body opened at end of line must sit deeper than its constru…
drop-audit: the field_join_view match cell indents its arms under the…
MIR: switch-table values are Vec[i64] at the three sites that still b…
ehartford commentedon Sep 26, 2026
Verified fixed on main 55739d4 (release binary): "expected an indented block after ':'" with §29.13 help.
Parser: a block's statements share its column; a line indented to no …
Parser: a block's statements share its column; a line indented to no …
Parser: a block's statements share its column; a line indented to no …
Language fixes: discarded results dropped, indentation, casts through…