Skip to content

feat(t27b): -> undefined on a fn the reference never analyzes - #6537

Merged
gHashTag merged 2 commits into
masterfrom
claude/t27b-tail-undefined-2
Oct 5, 2026
Merged

gHashTag merged 2 commits into
masterfrom
claude/t27b-tail-undefined-2

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Closes #6435
Refs #6063

What

  • A fn declared -> undefined that the reference never analyzes (Zig's lazy analysis: no test reaches it) lowers as a void fn. The reference never checks its return type.
  • A reached fn with -> undefined is still refused as type undefined, because the reference cannot compile it.
  • Code in the new submodule cli/t27b/src/lower/unanalyzed.rs, with one hook in signature() in lower.rs.

Owner exception

Allowed by the owner 2026-10-05; debt to be replaced via #6198.

Files

File Class
cli/t27b/src/lower.rs (hook, 2 lines) hand-written Rust (owner exception)
cli/t27b/src/lower/unanalyzed.rs hand-written Rust (owner exception)
cli/t27b/tests/common/mod.rs hand-written Rust test helpers (owner exception)
cli/t27b/tests/tail.rs hand-written Rust tests (owner exception)
docs/now/2026-10-05-t27b-undefined-ret.md prose (NOW entry)

Tests

  • cargo test -p t27b: all green.
  • tests/tail.rs: an unreached -> undefined fn passes; a reached one is refused with type undefined.

Corpus (t27b corpus specs --blockers --reference <t27c> --reference-cache, jobs 8, load avg ~90-290)

counted (t27b pass where reference passes) checked pass where reference fails mismatch
lab, master 2d5cdfd 671 / 725 390 0 0
this branch on b2fca78 680 / 728 399 0 0

No file loses its pass. Compared with the lab run, 9 files pass that did not before:

🤖 Generated with Claude Code

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>
@gHashTag gHashTag added the owner-approved-foreign Owner-approved exception to the only-t27 rule: hand-written foreign code allowed in this PR label Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 16:16:42 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 41
PRs with All Checks Green 9
READY 6
FAILING 41
PENDING 0
NO CHECKS YET 0

These columns do not partition: 6 + 41 + 0 + 0 = 47, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f2c8a4829f6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag

gHashTag commented Oct 5, 2026

Copy link
Copy Markdown
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).

@gHashTag gHashTag closed this Oct 5, 2026
@gHashTag gHashTag reopened this Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 16:57:20 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 39
PRs with All Checks Green 11
READY 10
FAILING 39
PENDING 0
NO CHECKS YET 0

These columns do not partition: 10 + 39 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=9f2c8a4829f6 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved-foreign Owner-approved exception to the only-t27 rule: hand-written foreign code allowed in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t27b: -> undefined on a fn the reference never analyzes (type undefined)

1 participant