pr 03.06
This commit is contained in:
@@ -14,55 +14,6 @@
|
||||
|
||||
---
|
||||
|
||||
## PR-03.06 — Deterministic overload resolution across deps (arity is not enough)
|
||||
|
||||
### Title
|
||||
|
||||
Implement deterministic overload selection using canonical signature matching
|
||||
|
||||
### Briefing / Context
|
||||
|
||||
We currently try to disambiguate overloads by arity as a fallback. That’s not sufficient (same arity, different types). For Phase 03 “professional grade”, overload resolution must be deterministic and match by full signature.
|
||||
|
||||
### Target
|
||||
|
||||
* Imported method call selects overload by:
|
||||
|
||||
1. resolve callee symbol → candidate set
|
||||
2. typecheck args → determine expected param types
|
||||
3. choose exact match
|
||||
4. otherwise `E_OVERLOAD_NOT_FOUND` or `E_OVERLOAD_AMBIGUOUS` deterministically
|
||||
|
||||
### Scope
|
||||
|
||||
* PBS FE typechecker must provide enough info to compute signature selection.
|
||||
* Resolver must expose all overload candidates for an imported `ImportRef` item.
|
||||
* Lowering uses canonical fn key and selected `SigId`.
|
||||
|
||||
### Checklist
|
||||
|
||||
* [ ] Ensure imported service methods are actually present in imported symbol arena.
|
||||
* [ ] Ensure candidates include `(owner, name, sig)` not just `name`.
|
||||
* [ ] Implement exact-match algorithm.
|
||||
* [ ] Implement deterministic ambiguity ordering for diagnostics.
|
||||
|
||||
### Tests
|
||||
|
||||
* Add golden regression reproducing `Log.debug` failure:
|
||||
|
||||
* dep exports `service Log { debug(string) }`
|
||||
* root imports `Log` and calls `Log.debug("x")`
|
||||
* Add tests for:
|
||||
|
||||
* ambiguous same signature
|
||||
* not found
|
||||
|
||||
### Risk
|
||||
|
||||
Medium/High. Needs clean integration across resolver/typechecker/lowering.
|
||||
|
||||
---
|
||||
|
||||
## PR-03.07 — Phase 03 cleanup: remove legacy compatibility branches and document boundary
|
||||
|
||||
### Title
|
||||
|
||||
Reference in New Issue
Block a user