Skip to content

Commit c893fbe

Browse files
committed
Revert "Refine criterion when to use fullyDefinedType in ClassTag search"
This reverts commit 1baf2b8.
1 parent 716e77f commit c893fbe

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

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

4996+
/** For uninstantiated type variables: the lower bound */
4997+
def lowerBound(using Context): Type = currentEntry.loBound
4998+
4999+
/** For uninstantiated type variables: the upper bound */
5000+
def upperBound(using Context): Type = currentEntry.hiBound
5001+
49965002
/** For uninstantiated type variables: Is the lower bound different from Nothing? */
4997-
def hasLowerBound(using Context): Boolean = !currentEntry.loBound.isExactlyNothing
5003+
def hasLowerBound(using Context): Boolean = !lowerBound.isExactlyNothing
49985004

49995005
/** For uninstantiated type variables: Is the upper bound different from Any? */
5000-
def hasUpperBound(using Context): Boolean = !currentEntry.hiBound.isTopOfSomeKind
5006+
def hasUpperBound(using Context): Boolean = !upperBound.isTopOfSomeKind
50015007

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

0 commit comments

Comments
 (0)