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
`isMatchingApply(tp1)` compares the applied type `tp1` with `tp2`.
Before this commit, we called it recursively incorrectly by passing it a
type constructor instead of an applied type. The result was that it
returned false when it shouldn't. This lead to infinite loops in some
cases as demonstrated by tests/pos/factory-conversion.scala.
Note: even before this commit, the added test case used to compile, but
only when using a non-bootstrapped compiler. This puzzling behavior was
due to the logic in `monitoredIsSubType` detecting the loop and breaking
out of it before it lead to a stackoverflow. Of course this kind of
detection is fragile since it depends on the stack size as well as the
size of each stack frame, so we just happened to get lucky with the
non-bootstrapped compiler but not with the bootstrapped one. As always,
when debugging subtyping issues, it's a good idea to run the compiler
with `-Yno-deep-subtypes` to replace the recovery logic in
`monitoredIsSubType` by an immediate crash.
0 commit comments