// `#import` is non-transitive for a type named in a REFLECTION / type-arg slot // (`size_of(T)`, `size_of(*T)`) and in a TYPED ARRAY-LITERAL annotation // (`T.[...]`), exactly like a bare leaf annotation (0763), a parameterized head // (0764), and values/functions (0706): when A imports B and B imports C, A must // NOT see C's top-level types here either. This file imports `b.sx` (which // imports `c.sx`) and references C's `Nums` / `COnly` in those positions — each // is rejected with a "type ... is not visible; #import the module that declares // it" diagnostic, BEFORE the global type table can resolve it. // // `b.sx` ↔ `c.sx` together still compile: `b_sizes` / `b_arr` resolve `Nums` / // `COnly` because b.sx directly imports c.sx (one flat hop there, two from a // file that imports b.sx). // // Regression (Phase E4): before the bare-TYPE gate reached the reflection // type-arg and array-literal leaf sites, these 2-flat-hop references leaked // through the global `type_alias_map` / `findByName` / `type_bridge` lookup. #import "modules/std.sx"; #import "0765-modules-import-reflection-type-non-transitive/b.sx"; main :: () -> s32 { print("{}\n", size_of(Nums)); print("{}\n", size_of(*COnly)); xs := Nums.[1, 2]; print("{} {}\n", xs[0], xs[1]); 0 }