Skip to content

Commit d705c1b

Browse files
committed
fix TypeBounds case in isNotNull
1 parent cf9883f commit d705c1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ object Types extends TypeUtils {
375375
case tp: FlexibleType => false
376376
case tp: ClassInfo => !tp.cls.isNullableClass && !tp.isNothingType
377377
case tp: AppliedType => tp.superType.isNotNull
378-
case tp: TypeBounds => tp.lo.isNotNull
378+
case tp: TypeBounds => tp.hi.isNotNull
379379
case tp: TypeProxy => tp.underlying.isNotNull
380380
case AndType(tp1, tp2) => tp1.isNotNull || tp2.isNotNull
381381
case OrType(tp1, tp2) => tp1.isNotNull && tp2.isNotNull

0 commit comments

Comments
 (0)