Files
scriptc/tests
Malte UblandClaude Opus 5.5 c7c214532e Lower species forms through a narrowing wrapper and a union flatMap
The species lowering for a callback method rebuilt its `%arr.<method>`
call by shape — the result had to be a call taking the receiver as its
first argument — so two forms the method lowering does produce fell to
SC1090 whenever the program declared a class that extends Array:

- a filter whose callback narrows: the filtered array comes back through
  the checked-narrowing wrapper, `call(%arr.narrow, [call(%arr.filter,
  …)])`, and the species path saw a call whose first argument is not the
  receiver;
- a flatMap whose callback returns a union with an array arm, which
  lowers to `%arr.flatMap.<n>` — a helper boundedArrayHofHelper rejected
  because arrHofInfo, which holds the pipeline-fusable helpers, has no
  entry for it.

The call is now found by walking the expression for the `%arr.` helper
call over the receiver, whatever wraps it, and boundedArrayHofHelper
accepts any `%arr.` helper (forEach excepted, it makes no array), so the
union flatMap earns a bounded variant. Hidden locals are still declared
in the old order, so a program that compiled before gets byte-identical
IR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 05:38:07 -07:00
..
…
2026-10-27 16:45:14 -05:00