File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,9 @@ object Inferencing {
108108 && ctx.typerState.constraint.contains(tvar)
109109 && {
110110 val direction = instDirection(tvar.origin)
111- def avoidBottom =
112- ! force.allowBottom &&
113- defn.isBottomType(ctx.typeComparer.approximation(tvar.origin, fromBelow = true ))
114111 def preferMin =
115- force.minimizeAll && (! avoidBottom || ! tvar.hasUpperBound)
116- || variance >= 0 && ! avoidBottom
112+ force.minimizeAll && (tvar.hasLowerBound || ! tvar.hasUpperBound)
113+ || variance >= 0 && (force.allowBottom || tvar.hasLowerBound)
117114 if (direction != 0 ) instantiate(tvar, direction < 0 )
118115 else if (preferMin) instantiate(tvar, fromBelow = true )
119116 else toMaximize = true
You can’t perform that action at this time.
0 commit comments