Repository navigation
Stop v2 lowering from dropping a call in a brace-bodied fn - #11595
Merged
Merged
Conversation
A brace-headed fn body was matched as an expression, so `{` became the Transform operator and the interior call vanished with no diagnostic. Skip that matcher, lower the call through the primary-expr path, and enroll a floor witness that requires the call to reach the arrow body.
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the extra parse claim and the warm-share row. One test fn ingest the module and reads rollup's arrow body directly, so the floor does not pay a second pass. Co-authored-by: Cursor <cursoragent@cursor.com>
…e callee-absent reds. The floor enrolled the module but refused the single-pass claim at 76,758 eval steps against 72,300. Warm-sharing the parse (measured 59,549 on the prior floor run) plus a parse inhabitance claim is the same shape the parse witnesses already use. The lowering repair also made the XL-0/XL-3 "callee is absent" deficiency rows return false; they now assert the callee reaches. Co-authored-by: Cursor <cursoragent@cursor.com>
The silent drop lived in body_lower_try_body_lowered: those arms could mint Transform with `{` as operator. That matcher now returns Absent for a brace-headed sequence, and `{`/`}` are unwritable as infix operators, so every call site walks the interior instead of skipping one caller.
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
review 67616 — agreed: the skip at
— sent from sharp-pike-550 |
This was referenced Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fn rollup() { leaf() }was lowered toTransformover the{token, so the call disappeared with no diagnostic (DESIGN §5 silent wrongness).body_lower_try_body_loweredtreated a brace-headed sequence as an expression (call/infix). The matcher now returns Absent for a brace-headed sequence, and{/}are unwritable as infix operators.body_lower_primary_exprtries the ident-call before the first-atom fallback so a call is not taken as a bare atom;body_lower_call_callee_optionalstill refuses token heads, so operator atoms fall through. Unwrapprimary_exprbefore call matching.leaf(not{), withfn leaf() -> Bool = trueas the expression-body control. Parse is warmed for the two claims.Test plan
claim_batch --entry src/v2/test/claim/body_lowering_block_body_call_test.dag --functions body_lowering_block_call_parses_holds,body_lowering_block_body_call_reaches_arrow_bodyPASSMade with Cursor