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
When creating a fresh type lambda for the purpose of higher-order type
inference, we incorrectly substituted references to type parameters
before this commit. We want to construct:
bodyArgs := otherArgs.take(d), T_0, ..., T_k-1
[T_0, ..., T_k-1] =>> otherTycon[bodyArgs]
For this type to be valid, we need the bounds of `T_i` to be the bounds of
the (d+i) type parameter of `otherTycon` after substituting references to
each type parameter of `otherTycon` by the corresponding argument in `bodyArgs`.
The previous implementation incorrectly substituted only the last `k` type
parameters, this was not enough for correctness. It could also lead to a crash
because it called `integrate` which implicitly assumes it is passed a full list
of type parameters (this is now documented).
Fixes#15983.
0 commit comments