Skip to content

Commit 83bd989

Browse files
committed
Refactor code
1 parent a25ddf5 commit 83bd989

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,10 @@ object TypeOps:
439439
tp.origin, fromBelow = variance > 0 || variance == 0 && tp.hasLowerBound)(using mapCtx)
440440
val lo1 = apply(lo)
441441
if (lo1 ne lo) lo1 else tp
442-
case tp: LazyRef if locals.contains(tp.ref) =>
443-
tp
444-
case tp: LazyRef if isExpandingBounds =>
445-
if variance == 1 then defn.AnyType
446-
else if variance == -1 then defn.NothingType
447-
else TypeBounds.empty
442+
case tp: LazyRef =>
443+
if locals.contains(tp.ref) then tp
444+
else if isExpandingBounds then emptyRange
445+
else mapOver(tp)
448446
case tl: HKTypeLambda =>
449447
locals ++= tl.paramRefs
450448
mapOver(tl)

0 commit comments

Comments
 (0)