Skip to content

Commit b63842f

Browse files
committed
Revert "More careful ClassTag instantiation"
This reverts commit 7c902e5.
1 parent c893fbe commit b63842f

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
@@ -4993,17 +4993,11 @@ 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-
50024996
/** For uninstantiated type variables: Is the lower bound different from Nothing? */
5003-
def hasLowerBound(using Context): Boolean = !lowerBound.isExactlyNothing
4997+
def hasLowerBound(using Context): Boolean = !currentEntry.loBound.isExactlyNothing
50044998

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

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

0 commit comments

Comments
 (0)