99d3968656
Closes the module-qualified-class-names milestone. Deletes the workspace-load workaround; the two-libraries case now resolves via type-driven dispatch at the call site with explicit qualifier as the LLM-author's disambiguation tool. Resolves both mq.2 known-debt items (active_declared_constraints plumbing, (class,method) re-key). New synth warnings channel emits class-method-shadowed-by-fn at all three fn-precedence branches per spec section Class-fn collisions. Three new E2E fixtures + integration tests cover the ambiguous, qualified, and class-fn-shadow trajectories. DESIGN.md class-names paragraph rewritten, new section Method dispatch added. Roadmap P2 marked done, milestone-24 unblocked for re-brainstorm. 9/9 tasks. 545 tests green. bench/compile_check.py + cross_lang.py exit 0; bench/check.py exit 1 (2 noise-class regressions, runtime uncoupled to typecheck iter).
48 lines
1.1 KiB
JSON
48 lines
1.1 KiB
JSON
{
|
|
"schema": "ailang/v0",
|
|
"name": "mq3_class_eq_vs_fn_eq_classmod",
|
|
"imports": [],
|
|
"defs": [
|
|
{
|
|
"kind": "class",
|
|
"name": "MyEq",
|
|
"param": "a",
|
|
"methods": [
|
|
{
|
|
"name": "myeq",
|
|
"type": {
|
|
"k": "fn",
|
|
"params": [
|
|
{ "k": "var", "name": "a" },
|
|
{ "k": "var", "name": "a" }
|
|
],
|
|
"param_modes": ["borrow", "borrow"],
|
|
"ret": { "k": "con", "name": "Bool" },
|
|
"effects": []
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"kind": "instance",
|
|
"class": "MyEq",
|
|
"type": { "k": "con", "name": "Int" },
|
|
"methods": [
|
|
{
|
|
"name": "myeq",
|
|
"body": {
|
|
"t": "lam",
|
|
"params": ["x", "y"],
|
|
"paramTypes": [
|
|
{ "k": "con", "name": "Int" },
|
|
{ "k": "con", "name": "Int" }
|
|
],
|
|
"retType": { "k": "con", "name": "Bool" },
|
|
"body": { "t": "lit", "lit": { "kind": "bool", "value": true } }
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|