Skip to content

feat(t27b): x.len() and len(x) as the .len field - #6571

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

gHashTag merged 3 commits into
masterfrom
claude/t27b-tail-lencall-2

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Closes #6454
Refs #6063

What

  • These three call shapes lower as the .len field access, exactly as t27c's Zig backend prints them (W570):
    • a.b.len();
    • a method len kept with its receiver;
    • a free len(x), when no fn len is declared.
  • A declared fn len is still called.
  • Code is in the new submodule cli/t27b/src/lower/lencall.rs, with one hook in lower.rs.

Owner exception

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

The local only-t27 hook (#6511) read an uncommitted line in tools/policy/foreign-exceptions.txt that names this PR's paths. That line is not in this PR, so the exception ends with the PR.

Files

File Class
cli/t27b/src/lower.rs (hook, 4 lines) hand-written Rust (owner exception)
cli/t27b/src/lower/lencall.rs hand-written Rust (owner exception)
cli/t27b/tests/lencall.rs hand-written Rust tests (owner exception)
docs/now/2026-10-05-t27b-lencall.md prose (NOW entry)

Tests

  • cargo test -p t27b: all green.
  • tests/lencall.rs: each source was run under t27c test-report first. It gives 3 pass and 1 fail there, and the same here.

Corpus (t27b corpus specs --blockers --reference <t27c> --reference-cache, jobs 8)

counted (t27b pass where reference passes) checked pass where reference fails mismatch
after #6537 and #6567 683 / 728 402 0 0
this branch 685 / 728 404 0 0

No file loses its pass. Two files newly pass: specs/math/gf_competitive.t27 and specs/tri/sort/selection_sort.t27.

🤖 Generated with Claude Code

gHashTag and others added 3 commits October 5, 2026 23:02
t27c's Zig backend prints a.b.len(), a method len with its receiver, and a
free len(x) (no fn len declared) as the .len field (W570); t27b lowers them
as that field access. A declared fn len is still called.

Closes #6454
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 17:21:47 UTC

Summary

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

These columns do not partition: 9 + 40 + 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: x.len() and len(x) as the .len field (ExprCall(method))

1 participant