Files
scriptc/tests
Chris Tate d68a705975 Read a union's discriminant once in checked casts
A checked cast into a union whose discriminant has four or more string
literals reads the discriminant field once (scr_dyn_discriminant_case)
and then tests only the arms whose literal it holds and the arms without
a literal, in the union's arm order. Every other arm's literal test would
fail, so the arm chosen and the error for a value no arm matches are
unchanged. A typed capsule, an accessor or an inherited discriminant
still takes the tests arm by arm. Unions with fewer literals emit the
same code as before.
2026-10-23 22:31:08 -05:00
..
2026-10-23 05:57:14 -05:00
…
2026-10-23 21:48:59 -05:00