@@ -849,7 +849,10 @@ trait Applications extends Compatibility { self: Typer =>
849
849
case tp @ ExprType (tp1) => tp.derivedExprType(repeatedToSingle(tp1))
850
850
case _ => if (tp.isRepeatedParam) tp.argTypesHi.head else tp
851
851
}
852
- isApplicable(alt2, tp1.paramTypes map repeatedToSingle, WildcardType ) ||
852
+ val formals1 =
853
+ if (tp1.isVarArgsMethod && tp2.isVarArgsMethod) tp1.paramTypes map repeatedToSingle
854
+ else tp1.paramTypes
855
+ isApplicable(alt2, formals1, WildcardType ) ||
853
856
tp1.paramTypes.isEmpty && tp2.isInstanceOf [MethodOrPoly ]
854
857
case _ =>
855
858
tp2 match {
@@ -878,7 +881,7 @@ trait Applications extends Compatibility { self: Typer =>
878
881
def winsOwner2 = isDerived(owner2, owner1)
879
882
def winsType2 = isAsSpecific(alt2, tp2, alt1, tp1)
880
883
881
- implicits .println(i " isAsGood( $alt1, $alt2)? $tp1 $tp2 $winsOwner1 $winsType1 $winsOwner2 $winsType2" )
884
+ overload .println(i " isAsGood( $alt1, $alt2)? $tp1 $tp2 $winsOwner1 $winsType1 $winsOwner2 $winsType2" )
882
885
883
886
// Assume the following probabilities:
884
887
//
@@ -1013,6 +1016,7 @@ trait Applications extends Compatibility { self: Typer =>
1013
1016
if (isDetermined(candidates)) candidates
1014
1017
else narrowMostSpecific(candidates) match {
1015
1018
case result @ (alt1 :: alt2 :: _) =>
1019
+ // overload.println(i"ambiguous $alt1 $alt2")
1016
1020
val deepPt = pt.deepenProto
1017
1021
if (deepPt ne pt) resolveOverloaded(alts, deepPt, targs)
1018
1022
else result
0 commit comments