plan: mq.3 — MethodNameCollision retirement + multi-class E2E + DESIGN.md sync, 9 tasks
Three out-of-band corrections precede the retirement (from mq.2 known debt): - T1: Env.active_declared_constraints field populated by check_fn pre-synth — enables resolve_method_dispatch's constraint-driven filter at synth time for rigid-var fallback. - T2: class_methods re-keyed to (QualifiedClassName, MethodName) tuple — post-retirement multiple classes can declare same-named methods. Mono's presence-check switches to method_to_candidate_classes (method-keyed natively). - T3: synth(...) signature extended with warnings: &mut Vec<Diagnostic> out-parameter; resolution ladder reordered so fn wins precedence matches spec §Class-fn collisions; class-method-shadowed-by-fn warning fires when both branches would have matched. Retirement (T4-T5): - Delete MethodNameCollision variant + Origin enum + pre-pass + Display arm. - Relocate the two pin tests to crates/ailang-check/tests/method_collision_pin.rs (cross-crate needed for Env.method_to_candidate_classes access); invert assertions to "loads clean + candidates populated". E2E (T6) — three new positive fixtures: - mq3_two_show_ambiguous: two Show classes both with Show Int → AmbiguousMethodResolution. - mq3_two_show_qualified: same workspace + explicit qualifier → clean resolve. - mq3_class_eq_vs_fn_eq: class MyEq + fn myeq → fn wins + shadow warning. Docs (T7-T8): - DESIGN.md: strike MethodNameCollision; reword AmbiguousInstance paragraph (per-class coherence stays; cross-class ambiguity is new); new §Method dispatch subsection anchors the 5-step rule. - Roadmap: P2 entry → [x]; milestone 24 depends-on cleared. WhatsNew is milestone-close (after audit), NOT mq.3. Boss decisions on recon's 6 open questions: - class_methods shape: tuple key (a). - Warning channel: synth out-parameter (a). - declared_constraints: post-superclass-expansion on Env. - Pin test location: relocate to ailang-check tests. - AmbiguousInstance paragraph: reword, don't delete. - Operator-=/< corner: out of scope (prelude ne/lt are free fns).
This commit is contained in: