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
This is to avoid unneeded new LazyRef's. LazyRefs, which are created
for recursive types, aren't cacheable, so if you TypeMap an AppliedType
with one, it will create a brand new instance. OrderingConstraint#init
runs AvoidWildcardsMap on param bounds. So when instDirection compares
the constraint bounds and the original param bounds (to calculate the
instantiate direction), because they are new instances they won't
shortcircuit, leading to a recursion overflow. By forcing, it will eq
check and return true.
In particular, with i5877, which is a neg test of recursive overflows,
the new implementation of interpolateTypeVars does more type comparisons
(to calculate the instDirection). If the LazyRefs are kept eq, then the
AppliedTypes in the bounds are also eq, and so the subtyping check
shortcircuits true, rather than overflowing.
0 commit comments