Skip to content

Commit ab74827

Browse files
Fix AppliedType logic
1 parent 80c25e3 commit ab74827

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] {
19261926
else
19271927
true
19281928
}
1929-
case (AppliedType(tycon1, args1), AppliedType(tycon2, args2)) =>
1929+
case (AppliedType(tycon1, args1), AppliedType(tycon2, args2)) if tycon1 == tycon2 =>
19301930
// Unboxed x.zip(y).zip(z).forall { case ((a, b), c) => f(a, b, c) }
19311931
def zip_zip_forall[A, B, C](x: List[A], y: List[B], z: List[C])(f: (A, B, C) => Boolean): Boolean =
19321932
x match {
@@ -1940,7 +1940,6 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] {
19401940
case _ => true
19411941
}
19421942

1943-
tycon1 == tycon2 &&
19441943
zip_zip_forall(args1, args2, tycon1.typeParams) {
19451944
(arg1, arg2, tparam) =>
19461945
val v = tparam.paramVariance

0 commit comments

Comments
 (0)