Skip to content

Native types should have crate-relative identifiers #149

@pcwalton

Description

@pcwalton

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions