Skip to content

typeck should safe-guard against types with un-substituted formals #13139

Closed
@pnkfelix

Description

@pnkfelix

Spawned off of #5121.

Part of the bug underlying #5121 lay dormant for quite a while because some of the type-checking machinery is not as aggressive as it could be about ensuring that the types it is checking actually correspond to concrete types.

In particular, in a concrete function type, the bound-type/lifetimes (i.e. the "formals" in P.L. speak) from the function's signature have been replaced with other concrete types (i.e. the "actuals").

Currently, the ty represetnation does not really distinguish between formals and actuals except for lifetimes. But nonetheless, we can at least safe-guard against this problem in that case (and presumably if we later change ty to between distinguish between formal/actual for type variables as well, then similar checks would go into the same place, probably).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemP-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions