Skip to content

Commit 1a6ca25

Browse files
committed
Drop special treatment of PolyTypes in wildApprox
I think it could go either way, but I did not find an instance where we would actually call wildApprox on a PolyType. So it's better to simplify and treat PolyTypes just like other TypeLambdas.
1 parent 85c641f commit 1a6ca25

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,14 +647,12 @@ object ProtoTypes {
647647
wildApprox(tp.resultType, theMap, seen, internal))
648648
case _: ThisType | _: BoundType => // default case, inlined for speed
649649
tp
650-
case tl: HKTypeLambda =>
650+
case tl: TypeLambda =>
651651
val internal1 = internal + tl
652652
tl.derivedLambdaType(
653653
paramInfos = tl.paramInfos.mapConserve(wildApprox(_, theMap, seen, internal1).bounds),
654654
resType = wildApprox(tl.resType, theMap, seen, internal1)
655655
)
656-
case tl: PolyType =>
657-
wildApprox(tl.resType, theMap, seen, internal)
658656
case _ =>
659657
(if (theMap != null && seen.eq(theMap.seen)) theMap else new WildApproxMap(seen, internal))
660658
.mapOver(tp)

0 commit comments

Comments
 (0)