fix(typecheck): ?T is an optional and accepts its payload - #6187
Merged
Merged
Conversation
resolve_type_str only knew the suffix spelling `T?`, so Zig's prefix
`?T` resolved to Custom("?u32") and `opt = value` with `value: u32`
was a false type mismatch. types_compatible now lets Optional(T)
accept T (and ?T) under the payload's own rules; cross-sign and
narrowing stay rejected.
Corpus ratchet: specs/pins/parser.t27 and
specs/port/scripts/gen_w378.t27 are UNEXPECTED PASS and nothing else
moved, so both ledger entries go and max_entries follows, 113 -> 111.
FROZEN_HASH resealed because compiler.rs changed (sha256 of the file).
Closes #6186
Refs #6063
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Contributor
PR DashboardGenerated at: 2026-10-04 16:47:58 UTC
Summary
Seal Status
|
This was referenced Oct 4, 2026
6 tasks
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.
Closes #6186
Refs #6063
What
resolve_type_strresolves Zig's prefix optional?T(it only knew the suffixT?;?u32becameCustom("?u32")).types_compatible: anOptional(T)target acceptsTand?Tunder the payload's own rules. Cross-sign and narrowing stay rejected.optional_accepts_its_payload_6186; FROZEN_HASH resealed (sha256 of compiler.rs).Evidence
?T: 3 verdicts changed, all removals of false diagnostics --specs/pins/parser.t27FAILED -> OK,specs/port/scripts/gen_w378.t27FAILED -> OK,queen-public-leaderboard.t278 -> 7 warnings.t27c suite --ratchet --corpus-only: UNEXPECTED PASS for exactly those two specs, 0 unexpected failures. Both ledger entries removed,max_entries113 -> 111.gen_w378was the lab's one LAB-FRONTEND-DISAGREES spec; it now reaches a real codegen blocker (string literal).🤖 Generated with Claude Code