Skip to content

Fix call mismatch poisoning across try suffixes - #10457

Merged
lukewilliamboswell merged 1 commit into
mainfrom
fix-10456-missing-question-mark
Jul 31, 2026
Merged

Fix call mismatch poisoning across try suffixes#10457
lukewilliamboswell merged 1 commit into
mainfrom
fix-10456-missing-question-mark

Conversation

@lukewilliamboswell

@lukewilliamboswell lukewilliamboswell commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

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

@lukewilliamboswell
lukewilliamboswell marked this pull request as ready for review July 29, 2026 08:43
@jaredramirez

Copy link
Copy Markdown
Collaborator

I'm not sure about this:

  1. I worry that introducing a probe on a hot path will negatively impact perf
  2. I don't follow why we shouldn't be commiting unify failures to the types store, that feels wrong to me (but i have not deeply understood the root cause here)

Is the segfault from the issue coming from Check?

@lukewilliamboswell
lukewilliamboswell force-pushed the fix-10456-missing-question-mark branch from faa4e0c to 66a4294 Compare July 31, 2026 00:15
@lukewilliamboswell
lukewilliamboswell merged commit c79ccb1 into main Jul 31, 2026
19 checks passed
@lukewilliamboswell
lukewilliamboswell deleted the fix-10456-missing-question-mark branch July 31, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

missing a ? after a failable function causes segfault

2 participants