Retire dispatch with erroneous operands - #10819
Merged
Merged
Conversation
…spatch-error-recovery # Conflicts: # src/compile/mod.zig
…spatch-error-recovery
Contributor
Greptile SummaryThe PR prevents erroneous call operands from contributing invalid static-dispatch constraints while preserving valid sibling dispatch.
Confidence Score: 5/5The PR appears safe to merge; no concrete blocking or independently actionable non-blocking issue was identified. The new error record is consumed before dispatch constraints are introduced, and required iterator plans retain publishable callable shapes whose rejection is explicitly converted to checked-error resolution downstream.
|
| Filename | Overview |
|---|---|
| src/check/Check.zig | Introduces exact erroneous-operand tracking, call retirement, and rejected iterator dispatch plans; investigated downstream consumers consistently honor the new recovery state. |
| src/compile/test/issue_10765_test.zig | Adds regression coverage for operand ordering, nested dispatch, iterator recovery, and recursive calls affected by issue #10765. |
| design.md | Documents the operand-retirement invariant and the special rejected-plan behavior required by iterator loops. |
| src/compile/mod.zig | Registers the new issue #10765 regression suite with the compile tests. |
| test/snapshots/static_dispatch/plus_operator_vs_method.md | Updates checked output to reflect retirement of an erroneous operator expression while preserving its annotated type. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Check operand expression] --> B{Checked value contains error?}
B -- No --> C[Introduce dispatch constraint]
B -- Yes --> D[Record erroneous operand identity]
D --> E{Parent requires iterator topology?}
E -- No --> F[Retire parent call-like expression]
E -- Yes --> G[Create rejected iter and next callable shapes]
F --> H[Publish explicit runtime error]
G --> I[Record topology plan]
I --> J[Resolve iterator calls as checked_error]
Reviews (1): Last reviewed commit: "Update error retirement snapshots" | Re-trigger Greptile
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.
An erroneous call operand could leave callable unification suppressed after the receiver's constraint set had already selected a different callable, causing checked-artifact publication to panic. This consumes the checker's exact erroneous-expression record to retire source calls before constraint introduction; required iterator topology plans instead carry explicitly rejected callable shapes. Independently valid sibling dispatch remains intact. Fixes #10765.