Skip to content

Commit b30310c

Browse files
committed
Replace TypeBound arguments by wildcards in wildApprox
1 parent d6719d5 commit b30310c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,14 @@ object ProtoTypes {
603603
else if (tp.symbol.isStatic || (tp.prefix `eq` NoPrefix)) tp
604604
else tp.derivedSelect(wildApprox(tp.prefix, theMap, seen))
605605
case tp @ AppliedType(tycon, args) =>
606+
def dropBounds(tp: Type) = tp match {
607+
case tp: TypeBounds if false => WildcardType(tp)
608+
case tp => tp
609+
}
606610
wildApprox(tycon, theMap, seen) match {
607611
case _: WildcardType => WildcardType // this ensures we get a * type
608-
case tycon1 => tp.derivedAppliedType(tycon1, args.mapConserve(wildApprox(_, theMap, seen)))
612+
case tycon1 => tp.derivedAppliedType(tycon1,
613+
args.mapConserve(arg => dropBounds(wildApprox(arg, theMap, seen))))
609614
}
610615
case tp: RefinedType => // default case, inlined for speed
611616
tp.derivedRefinedType(

0 commit comments

Comments
 (0)