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 {
4615
4615
/** For uninstantiated type variables: Is the upper bound different from Any? */
4616
4616
def hasUpperBound (using Context ): Boolean = ! currentEntry.hiBound.isRef(defn.AnyClass )
4617
4617
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
-
4632
4618
/** Unwrap to instance (if instantiated) or origin (if not), until result
4633
4619
* is no longer a TypeVar
4634
4620
*/
Original file line number Diff line number Diff line change @@ -179,9 +179,9 @@ object Inferencing {
179
179
&& {
180
180
val direction = instDirection(tvar.origin)
181
181
if minimizeSelected then
182
- if direction <= 0 && tvar.hasNonWildcardLowerBound then
182
+ if direction <= 0 && tvar.hasLowerBound then
183
183
instantiate(tvar, fromBelow = true )
184
- else if direction >= 0 && tvar.hasNonWildcardUpperBound then
184
+ else if direction >= 0 && tvar.hasUpperBound then
185
185
instantiate(tvar, fromBelow = false )
186
186
// else hold off instantiating unbounded unconstrained variable
187
187
else if direction != 0 then
You can’t perform that action at this time.
0 commit comments