1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Infer.java Mon Jan 24 15:45:24 2011 +0000 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Infer.java Mon Jan 24 15:45:41 2011 +0000 1.3 @@ -407,7 +407,9 @@ 1.4 1.5 // for varargs arguments as well 1.6 if (useVarargs) { 1.7 - Type elemType = types.elemtype(varargsFormal); 1.8 + //note: if applicability check is triggered by most specific test, 1.9 + //the last argument of a varargs is _not_ an array type (see JLS 15.12.2.5) 1.10 + Type elemType = types.elemtypeOrType(varargsFormal); 1.11 Type elemUndet = types.subst(elemType, tvars, undetvars); 1.12 while (actuals.nonEmpty()) { 1.13 Type actual = actuals.head.baseType();