File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments