Skip to content

feat(t27b): lower [T; N], repeats, text lists and [T] slices like the reference - #6347

Merged
gHashTag merged 1 commit into
masterfrom
claude/t27b-narray
Oct 5, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/t27b-narray

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Closes #6346
Refs #6063

What changed

cli/t27b/src/lower.rs now lowers these [N]T spellings so each per-test verdict equals t27c gen + zig:

  • [T; N];
  • the repeats [v; n] and [_]T{a} ** n. The element is evaluated once and copied forward by doubling, as .{...} ** n does;
  • text-list literals;
  • [T] slice parameters given a literal or a local array, mirroring t27c's @constCast(&[_]T{...}) and slice_locals.

Anything that cannot be matched gets a named refusal:

  • type [*]T
  • type [K:V]
  • ExprArrayLiteral(repeat to slice | text element | text form | repeat count | to slice)
  • "N elements for [M]T"
  • a text element that shadows a module name

Module constants are now registered before the signature pass, so a spliced const N used in an array type resolves.

Corpus (720 files, fixed binary copies, own t27c build + own reference cache)

pass pass_vacuous fail rejected front-end error mismatch timeout counted /720
before (master f329e27) 335 284 8 587 40 0 3 606
after 343 285 9 577 40 0 3 615
  • Counted: +9.
  • Checked pass with tests: 314 -> 322 (+8).
  • Newly passing: c_array_repeat_wrapper, bootrom, memory, partition, router, timing, tri-issue-create, gen_matrix3x3, and multipath_router (vacuous).
  • gen_w392 moved from rejected to fail. Its one failing test also fails in the reference.

Tests

  • t27_array_spellings_repeats_and_slice_arguments: its verdicts (3 pass, repeat_fails fails) were confirmed under t27c test-report.
  • t27_array_spelling_rejections_are_precise: covers 8 named refusals.

Reference bugs seen (not fixed here)

  • t27c does not parse a module-level const X: [u32; N] = [0; N];.
  • t27c does not rename a test local that shadows a module const, so Zig refuses it.

🤖 Generated with Claude Code

… reference

Lower the remaining [N]T spellings in cli/t27b/src/lower.rs and refuse
what cannot be matched with named blockers (type [*]T, type [K:V],
ExprArrayLiteral sub-kinds). Corpus counted 606 -> 615 of 720, checked
pass with tests 314 -> 322, mismatch 0.

Closes #6346

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-05 02:24:48 UTC

Summary

Status Count
Total Open PRs 46
PRs with Failing Checks 34
PRs with All Checks Green 12
READY 11
FAILING 34
PENDING 0
NO CHECKS YET 0

These columns do not partition: 11 + 34 + 0 + 0 = 45, and there are 46 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=8597b6ded596 != 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 merged commit e0e806a into master Oct 5, 2026
28 of 30 checks passed
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.

t27b: lower the remaining [N]T spellings (repeats, text lists, [T] slices) with named refusals

1 participant