1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Thu Jul 26 16:48:41 2012 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Thu Aug 02 18:22:41 2012 +0100 1.3 @@ -550,7 +550,7 @@ 1.4 /* The number of actuals and formals differ */ 1.5 InapplicableMethodException arityMismatch(); 1.6 /* An actual argument type does not conform to the corresponding formal type */ 1.7 - InapplicableMethodException argumentMismatch(boolean varargs, Type found, Type expected); 1.8 + InapplicableMethodException argumentMismatch(boolean varargs, JCDiagnostic details); 1.9 /* The element type of a varargs is not accessible in the current context */ 1.10 InapplicableMethodException inaccessibleVarargs(Symbol location, Type expected); 1.11 } 1.12 @@ -565,12 +565,12 @@ 1.13 public InapplicableMethodException arityMismatch() { 1.14 return inapplicableMethodException.setMessage("arg.length.mismatch"); 1.15 } 1.16 - public InapplicableMethodException argumentMismatch(boolean varargs, Type found, Type expected) { 1.17 + public InapplicableMethodException argumentMismatch(boolean varargs, JCDiagnostic details) { 1.18 String key = varargs ? 1.19 "varargs.argument.mismatch" : 1.20 "no.conforming.assignment.exists"; 1.21 return inapplicableMethodException.setMessage(key, 1.22 - found, expected); 1.23 + details); 1.24 } 1.25 public InapplicableMethodException inaccessibleVarargs(Symbol location, Type expected) { 1.26 return inapplicableMethodException.setMessage("inaccessible.varargs.type", 1.27 @@ -667,12 +667,8 @@ 1.28 this.rsWarner = rsWarner; 1.29 } 1.30 1.31 - public void report(DiagnosticPosition pos, Type found, Type req, JCDiagnostic details) { 1.32 - throw handler.argumentMismatch(useVarargs, found, req); 1.33 - } 1.34 - 1.35 - public Type rawInstantiatePoly(ForAll found, Type req, Warner warn) { 1.36 - throw new AssertionError("ForAll in argument position"); 1.37 + public void report(DiagnosticPosition pos, JCDiagnostic details) { 1.38 + throw handler.argumentMismatch(useVarargs, details); 1.39 } 1.40 1.41 public Warner checkWarner(DiagnosticPosition pos, Type found, Type req) {