Skip to content

Commit a451baa

Browse files
oderskysmarter
authored andcommitted
Update compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala
Co-authored-by: Guillaume Martres <[email protected]>
1 parent db09d12 commit a451baa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,9 @@ object ProtoTypes {
833833
def wildArgs = args.mapConserve(arg => wildApprox(arg, theMap, seen, internal))
834834
wildApprox(tycon, theMap, seen, internal) match {
835835
case WildcardType(TypeBounds(lo, hi)) if hi.typeParams.hasSameLengthAs(args) =>
836-
val lo1 = if lo.typeParams.hasSameLengthAs(args) then lo.appliedTo(wildArgs) else lo
837-
WildcardType(TypeBounds(lo1, hi.appliedTo(wildArgs)))
836+
val args1 = wildArgs
837+
val lo1 = if lo.typeParams.hasSameLengthAs(args) then lo.appliedTo(args1) else lo
838+
WildcardType(TypeBounds(lo1, hi.appliedTo(args1)))
838839
case WildcardType(_) =>
839840
WildcardType
840841
case tycon1 => tp.derivedAppliedType(tycon1, wildArgs)

0 commit comments

Comments
 (0)