Skip to content

Six fixes from the issue backlog: #2545, #2524, #2334, #2325, #2443, #2400, #2379 - #2587

Merged
ehartford merged 6 commits into
charptrfrom
issues-b
Oct 23, 2026
Merged

ehartford merged 6 commits into
charptrfrom
issues-b

Conversation

@ehartford

@ehartford ehartford commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Five fixes from the open-issue backlog, one commit each with a behavior fixture that failed before its fix:

Stacked on #2586 (the Linux seed legs' fixes). The first battery on the stack (315c2fb) was red on two D22 acceptance cells, behav_1903 and the typed-dump cell (the #2334 change) and on behav_zlib_gunzip_owned (the helper's contract); both corrected, the battery reruns on the stack's top.

@ehartford
ehartford added this pull request to stack #2588 October 23, 2026 18:14
Eric Hartford added 6 commits October 23, 2026 14:33
A pipeline stage's `it` after another stage's (`xs |> map(it * it) |>
collect[List]()`) was refused as a nested `it` (E0951): the parser counted
the implicit-closure depth per expression. Each argument that mentions `it`
is its own closure; two `it`s in one argument still read one parameter.
…gh it (#2524)

`xs[i] ?? 0` on a `List[Option[i32]]`: the element place is a `&Option[i32]`
(D27), so the carrier is what the view observes and the default is its
payload. Sema matched the `&Option` as a carrier itself and refused the
join; MIR lowered the view as the Option it is not. Sema unwraps the
pointee; a non-Copy payload reached through the view stays a view of it
(`Option[&T]` of the payload, D22); MirLower dereferences the view before
the discriminant read.
`fn find(xs: &List[i32], want: i32): for x in xs: if x == want: return x;
return -1` joined `&i32` with `i32` and ICE'd in MIR (an integer assigned
to a reference-typed return local). D22: a view materializes its Copy
value where an owned demand is established, and the join of a view arm
with an owned arm is the owned value, as an `if` with mixed arms is. The
return-type join takes the value; once inferred, every returned view of
it records its contextual copy (the walk mirrors
convert_body_values_to_option). An inferred return of a view alone keeps
the view (the D22 acceptance cell err_d22_inferred_return_preserves_view;
…ype (#2443)

Sema owns every expression's type (D65). The operator-method paths
returned the method's return without recording it, so `(a - 2.0).x` had no
type for the parenthesized base: MIR fell back to arithmetic over `V` and
`f64`, typed it Unit, and the validator refused a field projected out of a
scalar (an ICE). Both the binary and the unary method paths record it.
…#2400)

A struct literal that omits a field evaluates the field's default; the
literal-site check ran it under the literal's module, so a name the
default uses that only the declaring module imports (`V2 {}` from `game`,
used by `controls`) failed with "unknown type 'V2' in struct literal".
The default is the declaring module's expression: the check switches to
that declaration's source context and restores the literal's after.
…2379)

`first([7, 8, 9])` at `xs: [T; 3]` reported "cannot infer type parameter
'T'": under no demand the literal is a List (D113), whose shape did not
match the array parameter. The binder reads the argument node: a bracket
literal at `[T; N]` binds T from its elements' type and a generic N from
its count, and the argument is then typed as the array the specialization
demands (D93: a collection literal is typed by its use). A join decided
under no demand that a later demand agrees with is the same decision with
its demand named, not a conflict.
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery GREEN on 077d684 (the stack top: issues-b on charptr), 669 s, with run tools/battery.w under the pinned seed nightly-20261023-local-1-f78d2c24f59d. Gate, UAT and battery-checks all green; logs in the worktree's out/battery/.

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.

1 participant