Repository navigation
feat(t27b): -> undefined on a fn the reference never analyzes - #6537
Merged
Merged
Conversation
A port's stub `fn main() -> undefined { undefined; }` that no test,
invariant or constant reaches lowers as a fn with no result; Zig never
analyzes it, so the reference compiles the file. On a reached fn the type
stays refused (the reference is BLOCKED there).
Closes #6435
Refs #6063
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 5, 2026
Contributor
This was referenced Oct 5, 2026
Closed
Owner
Author
|
Closing and reopening to rebuild the merge ref. Seal Coverage failed on seals that master changed (specs/automation/kanban-card-chat.t27, specs/runtime/process.t27); this PR touches no spec. On current master the seal check holds locally (1330 hold, 124 in the baseline). |
Contributor
PR DashboardGenerated at: 2026-10-05 16:57:20 UTC
Summary
Seal Status
|
This was referenced Oct 5, 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.
Closes #6435
Refs #6063
What
-> undefinedthat the reference never analyzes (Zig's lazy analysis: no test reaches it) lowers as a void fn. The reference never checks its return type.-> undefinedis still refused astype undefined, because the reference cannot compile it.cli/t27b/src/lower/unanalyzed.rs, with one hook insignature()inlower.rs.Owner exception
Allowed by the owner 2026-10-05; debt to be replaced via #6198.
Files
cli/t27b/src/lower.rs(hook, 2 lines)cli/t27b/src/lower/unanalyzed.rscli/t27b/tests/common/mod.rscli/t27b/tests/tail.rsdocs/now/2026-10-05-t27b-undefined-ret.mdTests
cargo test -p t27b: all green.tests/tail.rs: an unreached-> undefinedfn passes; a reached one is refused withtype undefined.Corpus (
t27b corpus specs --blockers --reference <t27c> --reference-cache, jobs 8, load avg ~90-290)No file loses its pass. Compared with the lab run, 9 files pass that did not before:
routes/status.t27,scripts/tri-pr-create.t27, and trios-bridgemain.t27.bench_nn,unified_state, and trinity-brainphi.t27b_progress,blog-ru, anddogfood.🤖 Generated with Claude Code