Files
scriptc/tests/corpus/6901-node-island-array-intersection/node_modules
Malte UblandClaude Opus 5.5 d2e3690bc3 Keep island arrays of intersection types as handles
`Choice[] & GenChoice[]`, an island array extended by the caller's own choice
type (pi's openrouter images: `imageResponse.choices`), was refused with
SC8010. The intersection has no native IR type of its own — mapTypeOf
returns null, or its arms map to different array types — so the crossing
failed before the container rules that keep an array the island does not
declare a handle.

An intersection of containers is a container: it is a value of each arm, and
where the program only uses it through island operations (member reads, an
island call, an island identity test, a handle binding) it now stays a
handle, exactly as an undeclared array does. Elements and fields the
declaration does name cross back out on their own terms, so an element's
`images` array copies, and any other use still refuses rather than inventing
a native layout.

Test: tests/corpus/6901-node-island-array-intersection (both shapes, the
island-declared arm and the caller's own arm, differential to Node, plain
and sanitized).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:14:37 -07:00
..