You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Receiver trait with target: Ignore post-Deref errs.
When probing for methods, we step forward through a chain of types. The first
few of those steps can be reached by jumping through the chain of Derefs or the
chain of Receivers. Later steps can only be reached by following the chain of
Receivers. For instance, supposing A and B implement both Receiver and Deref,
while C and D implement only Receiver:
Type A<B<C<D<E>>>>
Deref chain: A -> B -> C
Receiver chain: A -> B -> C -> D -> E
We report bad type errors from the end of the chain. Previously this 'receiver
trait with target' code reported problems encountered at the end of the whole
chain, but in fact we never morph the self type that far. So we now instead
report errors encountered only at the end of the Deref chain.
A test case is included which demonstrates the problem.
0 commit comments