File tree Expand file tree Collapse file tree 2 files changed +2
-16
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -4615,20 +4615,6 @@ object Types {
46154615 /** For uninstantiated type variables: Is the upper bound different from Any? */
46164616 def hasUpperBound (using Context ): Boolean = ! currentEntry.hiBound.isRef(defn.AnyClass )
46174617
4618- /** For uninstantiated type variables: Is the lower bound different from Nothing and
4619- * does it not contain wildcard types?
4620- */
4621- def hasNonWildcardLowerBound (using Context ): Boolean =
4622- val lo = currentEntry.loBound
4623- ! lo.isExactlyNothing && ! lo.containsWildcardTypes
4624-
4625- /** For uninstantiated type variables: Is the upper bound different from Any and
4626- * does it not contain wildcard types?
4627- */
4628- def hasNonWildcardUpperBound (using Context ): Boolean =
4629- val hi = currentEntry.hiBound
4630- ! hi.isRef(defn.AnyClass ) && ! hi.containsWildcardTypes
4631-
46324618 /** Unwrap to instance (if instantiated) or origin (if not), until result
46334619 * is no longer a TypeVar
46344620 */
Original file line number Diff line number Diff line change @@ -179,9 +179,9 @@ object Inferencing {
179179 && {
180180 val direction = instDirection(tvar.origin)
181181 if minimizeSelected then
182- if direction <= 0 && tvar.hasNonWildcardLowerBound then
182+ if direction <= 0 && tvar.hasLowerBound then
183183 instantiate(tvar, fromBelow = true )
184- else if direction >= 0 && tvar.hasNonWildcardUpperBound then
184+ else if direction >= 0 && tvar.hasUpperBound then
185185 instantiate(tvar, fromBelow = false )
186186 // else hold off instantiating unbounded unconstrained variable
187187 else if direction != 0 then
You can’t perform that action at this time.
0 commit comments