Expands an inherited slot type into the union of its valid narrowings.
Used by Override on the parent side of the assignability check: the helper widens the inherited type so
that the new union-narrowing inheritance forms — union-derived indexed-record models
being subsetted (Form 2) or replaced by a single variant (Form 1) — pass the structural compatibility test that
gates resource extension.
Indexed-record models projected from union slots are expanded into the disjunction of:
the exact record (Form 2 full retention);
the partial record (Form 2 subsetting);
each variant's value model (Form 1 single-variant narrowing).
Tuple-wrapped indexed-record models (multi-valued ranges) are widened recursively through the singleton tuple. Any
other type passes through unchanged. Detection is purely structural (keys must all match ${number}), so the
expansion only fires for indexed-union slots, leaving regular nested-resource and primitive slots intact.
Type-level acceptance is intentionally permissive: kinds absent from the parent union are still rejected at compile
time, while a child variant narrowing no parent variant, several, or the same parent as another child variant
compiles but throws at runtime.
The plural name denotes the resulting set of acceptable narrowings: any of the listed forms qualifies. From the
child author's perspective, the inheritance narrows the parent; from the type checker's perspective, the parent's
expansion accepts the child's slot.
Expands an inherited slot type into the union of its valid narrowings.
Used by Override on the parent side of the assignability check: the helper widens the inherited type so that the new union-narrowing inheritance forms — union-derived indexed-record models being subsetted (Form 2) or replaced by a single variant (Form 1) — pass the structural compatibility test that gates resource extension.
Indexed-record models projected from union slots are expanded into the disjunction of:
Tuple-wrapped indexed-record models (multi-valued ranges) are widened recursively through the singleton tuple. Any other type passes through unchanged. Detection is purely structural (keys must all match
${number}), so the expansion only fires for indexed-union slots, leaving regular nested-resource and primitive slots intact.Type-level acceptance is intentionally permissive: kinds absent from the parent union are still rejected at compile time, while a child variant narrowing no parent variant, several, or the same parent as another child variant compiles but throws at runtime.
The plural name denotes the resulting set of acceptable narrowings: any of the listed forms qualifies. From the child author's perspective, the inheritance narrows the parent; from the type checker's perspective, the parent's expansion accepts the child's slot.