Problem
The cross-file registry is keyed by simple class name. When a file locally declares a plain class Foo AND holds (e.g. via an inherited super.thing typed in the base file's scope) a DIFFERENT, @SolidState-bearing Foo from another library, only one behavior is expressible:
Fix
Qualify registry entries by their origin library and disambiguate at rewrite time:
- Registry entries become
name → [(originUri, scalar/collection fields)] — the one-hop threading already tracks origin URIs; stop dropping shadowed foreign entries, store them qualified.
- In the value rewriter's tier-1 (resolved
staticType) path, compare the receiver's element library URI against the entry's origin — rewrite only on a match. thing (staticType = base file's Foo) lowers; f (staticType = local Foo) doesn't. Precise, not name-based.
- AST-only tiers (unresolved contexts) cannot know the library: under any same-name ambiguity (multiple entries, or an entry + a local declaration) keep today's conservative no-rewrite. The change can only ADD correct rewrites where real resolution exists — never introduce a wrong one.
This also narrows SPEC §4.9's documented name-collision caveat wherever tier-1 resolution applies.
Problem
The cross-file registry is keyed by simple class name. When a file locally declares a plain
class FooAND holds (e.g. via an inheritedsuper.thingtyped in the base file's scope) a DIFFERENT,@SolidState-bearingFoofrom another library, only one behavior is expressible:Foowrongly rewrites reads on the LOCAL plain class (non-compiling.value— caught and blocked in fix(solid_generator): seed bare super.x constructor params syntactically #109's review), sothing.label) stays silently un-lowered. Documented trade-off in thecross_file_super_param_one_hop_local_shadowfixture; same family as the Cross-file @SolidState reads through constructor-injected holders are silently un-lowered #104 decoy limitation.Fix
Qualify registry entries by their origin library and disambiguate at rewrite time:
name → [(originUri, scalar/collection fields)]— the one-hop threading already tracks origin URIs; stop dropping shadowed foreign entries, store them qualified.staticType) path, compare the receiver's element library URI against the entry's origin — rewrite only on a match.thing(staticType = base file'sFoo) lowers;f(staticType = localFoo) doesn't. Precise, not name-based.This also narrows SPEC §4.9's documented name-collision caveat wherever tier-1 resolution applies.