You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
t27b: @intCast with a result type (gen_fuzz, lane 4) #7412
specs/port/trinity/src/tri/gen_fuzz.t27 is blocked on ExprCall(@intCast). gen-zig prints @intCast(x) exactly as written, and the reference (t27c test-report) passes 8/8 with 0 vacuous tests. This is a backend gap, not a spec defect: t27b refuses every @intCast, and 36 corpus specs use it.
What Zig does, which t27b should match:
The result type comes from the context: @as(T, ..), a typed binding, a parameter, or a return. With no result type it is a compile error.
The value is kept exactly. A lossless conversion widens. Any other conversion is checked: a value outside T is a safety panic in Debug, so the test fails. This includes unsigned to unsigned, unlike as, which truncates there.
A literal operand that does not fit T is a compile error.
The slice:
A conformance spec specs/tri/t27b/conformance/int_cast.t27, whose names are unique in the corpus. It runs first under t27c test-report.
@intCast with an integer result type lowers to a checked cast. cli/t27b/tests/intcast.rs covers the trap cases, and each one was checked against the reference first.
gen_fuzz moves blocked -> pass in the ledger, together with the conformance row.
Done when gen_fuzz passes under t27b with the reference's verdicts, the corpus shows 0 mismatch and 0 jit_interp_mismatch, and no other spec changes verdict in a way the reference disagrees with.
Foreign-line budget (owner rule #7371, merged in #7399): PR #7417 is over it, so it is now a draft with auto-merge off.
Master's check_budget() run on git diff --numstat --no-renames origin/master...claude/t27b-lane4-intcast:
file
added
cap
cli/t27b/src/lower.rs
58
40 per file
cli/t27b/tests/intcast.rs
120
40 per file
whole PR
178
80 per PR
The owner-approved-foreign label does not lift this cap, and splitting the work into smaller PRs to get under it would dodge the rule, so I am not doing that. The @intCast lowering (range check, literal fit, widen/wrap) has to move into .t27 and come out of gen-rust. The trap cases now in tests/intcast.rs need a home that is not hand-written Rust. The conformance spec specs/tri/t27b/conformance/int_cast.t27 and the ledger rows (gen_fuzz, server_main) stay valid for that rework.
Reopened 2026-10-07: the bulk close of issues without a ## Boundary section was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.
Activity
ledger: server_main.t27 passes once @intcast lowers; first row, pass (C…
gHashTag commentedon Oct 7, 2026
Foreign-line budget (owner rule #7371, merged in #7399): PR #7417 is over it, so it is now a draft with auto-merge off.
Master's
check_budget()run ongit diff --numstat --no-renames origin/master...claude/t27b-lane4-intcast:cli/t27b/src/lower.rscli/t27b/tests/intcast.rsThe
owner-approved-foreignlabel does not lift this cap, and splitting the work into smaller PRs to get under it would dodge the rule, so I am not doing that. The@intCastlowering (range check, literal fit, widen/wrap) has to move into.t27and come out of gen-rust. The trap cases now intests/intcast.rsneed a home that is not hand-written Rust. The conformance specspecs/tri/t27b/conformance/int_cast.t27and the ledger rows (gen_fuzz, server_main) stay valid for that rework.Part of #6063. PR: #7417.
gHashTag commentedon Oct 7, 2026
Reopened 2026-10-07: the bulk close of issues without a
## Boundarysection was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.t27b ledger: batch bless from a full lab run on master (Closes #7432) (…
spec(policy): drop a redundant @intcast in added_lines so t27b compil…
t27b: the Mach-O object layout and bytes are a t27 spec (Closes #7526) (
ledger: gen_fuzz and server_main pass once @intcast lowers (Closes #7412
t27b: @intcast with an integer result type lowers from a t27 plan (Cl…