@@ -900,8 +900,8 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
900900
901901 def tryBaseType (cls2 : Symbol ) =
902902
903- def computeBase (tp : Type ): Type = tp .widenDealias match
904- case tp @ AndType (tp1, tp2 ) =>
903+ def computeBase (tp1 : Type ): Type = tp1 .widenDealias match
904+ case tp @ AndType (tp11, tp12 ) =>
905905 // We have to treat AndTypes specially, since the normal treatment
906906 // of `(T1 & T2).baseType(C)` combines the base types of T1 and T2 via glb
907907 // which drops any types that don't exist. That forgets possible solutions.
@@ -912,11 +912,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
912912 // does not hold. The new strategy is to declare that the base type computation
913913 // failed since R does not have a base type, and to proceed to fourthTry instead,
914914 // where we try both sides of an AndType individually.
915- val b1 = computeBase(tp1 )
916- val b2 = computeBase(tp2 )
915+ val b1 = computeBase(tp11 )
916+ val b2 = computeBase(tp12 )
917917 if b1.exists && b2.exists then tp.derivedAndType(b1, b2) else NoType
918918 case _ =>
919- nonExprBaseType(tp , cls2).boxedIfTypeParam(tp .typeSymbol)
919+ nonExprBaseType(tp1 , cls2).boxedIfTypeParam(tp1 .typeSymbol)
920920
921921 val base = computeBase(tp1)
922922 if base.exists && (base ne tp1)
0 commit comments