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
Commit d272e53
Browse filesBrowse the repository at this point in the historyBrowse files
fix(diagnostics): continued if/match also needs statement position
CodeRabbit follow-up on #862: Unit alone is not evidence of a continued
statement. `let y = (if c { () } else { () })(3);` is a Unit-valued call
in value position, and it was still told to add a `;`.
A #644 continuation can only appear as a call that stands as a whole
statement or as a block's final expression. synth_block_body now records
those calls (statement_calls, compared by physical identity, reset by
each check_program). StatementContinued requires that position and the
Unit type. The known limit is in the doc comment: parentheses are not in
the AST, so `(if c { () } else { () })(3);` standing alone as a
statement is still read as a continuation.
Tests: unit_valued_value_position_keeps_not_a_function (if and match).
dune runtest: 858 pass. Ledger: 5/5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDiosfvobXq67wbduuK
0 commit comments