Files
Malte Ubl 88994065c4 Keep supertype-parameter array callbacks static
Since #784, an array whose elements are proven present passes each element
itself to its callback instead of the optional element value. A callback
whose parameter is a structural supertype of the element
(`refs.find((r: { pos: number }) => ...)` over a wider record) has no
adapter from the plain element record, so lowering rejected it with SC2011.
Before #784 the optional element ABI converted it through a union retag.

The optional-read prepass now treats a site as present only when the
callback's element parameter accepts the stored element through a
mechanical conversion. Otherwise the site keeps the optional element visit,
as before #784. Unannotated and generic parameters are unaffected, so every
site #784 made precise stays precise.
2026-10-09 09:29:51 -07:00
..
2026-07-22 18:08:04 -05:00