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
Avoid looping when inferring types with recursive lower bounds in constraints
i3627.scala caused the typer to loop in several different ways. One was in isSubType,
the other in wildApprox.
The isSubType loop can be fixed by leaving monitoring on once the limit was reached
for the remainder of the top-level subtype check. I am not exactly sure what caused
the loop but the observation was a very long or infinite oscillation around the monitoring
limit. Leaving monitoring on is certainly not incorrect - the previous trick to turn
it off for recursions under the limit was purely for optimization. On the other hand
I am not sure whether the new scheme is sufficient, or whether we can still have
the situation of infinite recursions that stay under the depth limit.
The wildApprox loop was a simple bug (the `seen` value was not propagated correctly
to the TypeMap). The fix also removed a case in wildApproxBounds that had no clear purpose.
0 commit comments