Files
scriptc/tests
Chris Tate 4d417da7b8 Select the discriminated member for asserted object literals
An object literal asserted to a discriminated union keeps its own record
layout, and that layout can equal another member's layout: in
`{ kind: "return", value, loc } as Stmt`, a non-null `value` gives the
fields of a `throw` member. The value was wrapped as that member, so a
switch on `kind` read it with the `return` member's layout. The compiled
program aborted with an invalid union tag or read past the record; the
native compiler crashed this way while lowering three.js.

The literal's discriminant now selects the member through type
assertions too, as it already did through parentheses and `satisfies`.
2026-10-18 10:22:24 -05:00
..
2026-10-18 09:37:20 -05:00