We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a25ddf5 commit 83bd989Copy full SHA for 83bd989
compiler/src/dotty/tools/dotc/core/TypeOps.scala
@@ -439,12 +439,10 @@ object TypeOps:
439
tp.origin, fromBelow = variance > 0 || variance == 0 && tp.hasLowerBound)(using mapCtx)
440
val lo1 = apply(lo)
441
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
+ case tp: LazyRef =>
+ if locals.contains(tp.ref) then tp
+ else if isExpandingBounds then emptyRange
+ else mapOver(tp)
448
case tl: HKTypeLambda =>
449
locals ++= tl.paramRefs
450
mapOver(tl)
0 commit comments