File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -106,13 +106,12 @@ object Inferencing {
106
106
case tvar : TypeVar
107
107
if ! tvar.isInstantiated && ctx.typerState.constraint.contains(tvar) =>
108
108
force.appliesTo(tvar) && {
109
- val pref = tvar.origin
110
- val direction = instDirection(pref)
109
+ val direction = instDirection(tvar.origin)
111
110
def avoidBottom =
112
111
! force.allowBottom &&
113
- defn.isBottomType(ctx.typeComparer.approximation(pref , fromBelow = true ))
112
+ defn.isBottomType(ctx.typeComparer.approximation(tvar.origin , fromBelow = true ))
114
113
def preferMin = force.minimizeAll || variance >= 0 && ! avoidBottom
115
- if (direction != 0 ) instantiate(tvar, fromBelow = direction < 0 )
114
+ if (direction != 0 ) instantiate(tvar, direction < 0 )
116
115
else if (preferMin) instantiate(tvar, fromBelow = true )
117
116
else toMaximize = true
118
117
foldOver(x, tvar)
You can’t perform that action at this time.
0 commit comments