Skip to content

Commit e4b8f3c

Browse files
committed
Refine criterion when to use fullyDefinedType in ClassTag search
1 parent b677f97 commit e4b8f3c

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5117,17 +5117,11 @@ object Types extends TypeUtils {
51175117
*/
51185118
private def currentEntry(using Context): Type = ctx.typerState.constraint.entry(origin)
51195119

5120-
/** For uninstantiated type variables: the lower bound */
5121-
def lowerBound(using Context): Type = currentEntry.loBound
5122-
5123-
/** For uninstantiated type variables: the upper bound */
5124-
def upperBound(using Context): Type = currentEntry.hiBound
5125-
51265120
/** For uninstantiated type variables: Is the lower bound different from Nothing? */
5127-
def hasLowerBound(using Context): Boolean = !lowerBound.isExactlyNothing
5121+
def hasLowerBound(using Context): Boolean = !currentEntry.loBound.isExactlyNothing
51285122

51295123
/** For uninstantiated type variables: Is the upper bound different from Any? */
5130-
def hasUpperBound(using Context): Boolean = !upperBound.isTopOfSomeKind
5124+
def hasUpperBound(using Context): Boolean = !currentEntry.hiBound.isTopOfSomeKind
51315125

51325126
/** Unwrap to instance (if instantiated) or origin (if not), until result
51335127
* is no longer a TypeVar

0 commit comments

Comments
 (0)