diff --git a/docs/roadmap.md b/docs/roadmap.md index 6fa779d..c9ee486 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -77,6 +77,24 @@ work progresses. classes beyond the prelude four; multi-parameter classes; superclass chains; richer instance bodies. Deferred from milestone 22. - context: JOURNAL 2026-05-09 +- [ ] **\[milestone\]** Module-qualified class names + type-driven + method dispatch — retire the `MethodNameCollision` workaround + (`crates/ailang-core/src/workspace.rs:472`) that today keeps bare + class names viable by enforcing workspace-global method-name + uniqueness. Replaces name-driven method resolution + (`ModuleGlobals::class_methods: IndexMap`, + `crates/ailang-check/src/lib.rs:983`; consumed by + `mono::rewrite_class_method_calls`, `crates/ailang-check/src/mono.rs:657`) + with type-driven dispatch — look up `eq` candidates by argument + type, pick the unique class instance, fail closed on ambiguity. + Once shipped, two libraries can each declare `class Eq` with their + own `eq`. Carries its own DESIGN spec: inference rules, ambiguity + diagnostics, and the canonical-form extension for class-reference + fields (`InstanceDef.class`, `SuperclassRef.class`, `Constraint.class`) + that the canonical-type-names milestone explicitly out-of-scoped. + - context: `docs/specs/2026-05-10-canonical-type-names.md` "Out of + scope: Class names" — the workaround is named there so it stays + visible until this milestone retires it. - [ ] **\[todo\]** Boehm full retirement — remove the transitional Boehm GC path now that RC + uniqueness is the canonical memory story.