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
Use solved type vars to improve bounds of undetermined vars
When instantiating type parameters and retracting unsolved ones via
adjustTypeArgs and friends we end up with a list of solved type
params/variables and a list of still-undetermined type parameters.
Typically this is followed by a substitution of the solved variables
into the positions of the corresponding parameters, and type checking
proceeds with the substitutions eliminated from the list of undetermined
type parameters.
However, the substituted parameters might occur as components of the
bounds of the type parameters which are yet to be determined and, prior
to this commit, these occurrences are not substituted into with the solved
variables. This leads to issues of the form seen in scala/bug#10528.
This commit performs the substitution similarly to the way it is done in
enhanceBounds in typedAppliedTypeTree and fixesscala/bug#10528.
The new addition is largely a duplicate of the existing mechanism in
part to enable it to use updateInfo rather than setInfo and so preserve
type histories. There is a TODO to investigate whether the original
mechanism should also attempt to preserve type histories and whether the
two methods can be combined.
0 commit comments