Closed
Description
Native type identifiers are global, not crate-relative. This doesn't seem easy to typecheck because of the diamond import problem:
Suppose:
- Crate A defines a native type foo;
- Crate B imports A and exports A.foo;
- Crate C imports A and exports A.foo;
- Crate D imports B and C and unifies B.foo and C.foo.
B.foo and C.foo won't be considered compatible.
Instead of having one global value set, we could subject them to crate-relative name resolution, just like any other type. In other words, we would have e.g. "TY_native of crate_id * native_id".
Metadata
Metadata
Assignees
Labels
No labels