Shadowed names provide very unhelpful error messages #48
Owner
```
Repro of the smell (current behavior):
use std/Eq
Eq.eq(3, 3) # → "error: unbound variable 'Eq.eq'"
`use std/Eq` imports the MODULE Eq, shadowing the prelude's INTERFACE Eq; `eq` isn't a
module member, so it should be a clean resolve error, but resolve emits an optimistic
MemberRef and infer reports it. (Without the `use`, Eq.eq works fine — generalization is
not the issue.)
Root: resolve.mli:1 states "every name reference is classified by its binding category,"
but qualified `Mod.member` violates it. resolve's module namespace is PUBLIC-ONLY
(module_sig_names filters private, types.ml:~241), so resolve can't tell "absent" from
"private" and defers both (ARModule branch resolve.ml:~768-799 → qualified_binding
~691). Infer does the real check at infer.ml:~1438-1445 against the full sig
(module_sig.members keeps visibility). Visibility is SYNTACTIC (pub/private), so giving
resolve visibility does NOT re-couple to inferred sigs — the phase separation is about
inferred TYPES only.
```
bug
label
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?