Skip to content

Commit 4ae4273

Browse files
committed
use range to avoid duplicate code
1 parent a917c93 commit 4ae4273

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/src/dotty/tools/dotc/transform/IsInstanceOfChecker.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ object Checkable {
9393
case tp: TypeRef if tp.underlying.isInstanceOf[TypeBounds] =>
9494
val lo = this(tp.info.loBound)
9595
val hi = this(tp.info.hiBound)
96-
if (variance == 0) range(lo, hi)
97-
else if (variance == 1) hi
98-
else lo
96+
range(lo, hi)
9997
case _ =>
10098
mapOver(tp)
10199
}

0 commit comments

Comments
 (0)