Fix call mismatch poisoning across try suffixes - #10457
Merged
Merged
Conversation
lukewilliamboswell
marked this pull request as ready for review
July 29, 2026 08:43
Collaborator
|
I'm not sure about this:
Is the segfault from the issue coming from |
lukewilliamboswell
force-pushed
the
fix-10456-missing-question-mark
branch
from
July 31, 2026 00:15
faa4e0c to
66a4294
Compare
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
Closes #10456.
Root cause
Ordinary call-argument mismatch recovery merged the expected and actual roots into the error type. For a monomorphic local, the actual root was shared with its producer, so the valid producer call was retroactively left with an erroneous checked type. The match desugared from the try suffix also did not inherit the condition's error marker, leaving postcheck to lower an ordinary match around a condition with no valid checked type.
The call relation now runs in a commit probe: successful relations keep their mutations, while rejected relations roll back completely and report the mismatch from the pristine expected and actual types. Only the rejected call is marked erroneous. Matches explicitly inherit an erroneous condition, preserving the checked-to-postcheck boundary.
CI follow-up
The first PR run exposed a baseline Windows failure in the issue #10403 fixture: its platform declared Linux and Apple targets but no x64win target. Adding that explicit target fixes the Windows harness configuration. PR #10452 contains the same fixture correction; its red run was an unrelated timeout in the JSON optional-fields test, not a failure of the target fix.
Verification