Skip to content

Commit 1baf2b8

Browse files
oderskytgodzik
authored andcommitted
Refine criterion when to use fullyDefinedType in ClassTag search
[Cherry-picked e4b8f3c]
1 parent 7c902e5 commit 1baf2b8

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
@@ -4985,17 +4985,11 @@ object Types extends TypeUtils {
49854985
*/
49864986
private def currentEntry(using Context): Type = ctx.typerState.constraint.entry(origin)
49874987

4988-
/** For uninstantiated type variables: the lower bound */
4989-
def lowerBound(using Context): Type = currentEntry.loBound
4990-
4991-
/** For uninstantiated type variables: the upper bound */
4992-
def upperBound(using Context): Type = currentEntry.hiBound
4993-
49944988
/** For uninstantiated type variables: Is the lower bound different from Nothing? */
4995-
def hasLowerBound(using Context): Boolean = !lowerBound.isExactlyNothing
4989+
def hasLowerBound(using Context): Boolean = !currentEntry.loBound.isExactlyNothing
49964990

49974991
/** For uninstantiated type variables: Is the upper bound different from Any? */
4998-
def hasUpperBound(using Context): Boolean = !upperBound.isTopOfSomeKind
4992+
def hasUpperBound(using Context): Boolean = !currentEntry.hiBound.isTopOfSomeKind
49994993

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

0 commit comments

Comments
 (0)