Closed
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.