-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-type-systemArea: Type systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
The new type inferencer in PR #15955 does not track spans as precisely as it could. When two unbound type variables are related to one another, it records the relation (subtype, supertype, equality) but does not record the reason that the relation exists (i.e., the associated span and TypeTrace
). When one of those two variables is later bound to a specific type T
, the other will also be bound to a type U
(derived from T
) and T
and U
will be related -- but this relation will use the current span and TypeTrace, rather than the original span. The primary side-effect of this is that the output from a "cannot infer" message will be more confusing -- but given that that output is already pretty useless, I was unable to get a good example.
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.