equal
deleted
inserted
replaced
552 // This is not a polymorphic method, but typeargs are supplied |
552 // This is not a polymorphic method, but typeargs are supplied |
553 // which is fine, see JLS 15.12.2.1 |
553 // which is fine, see JLS 15.12.2.1 |
554 } else if (mt.hasTag(FORALL) && typeargtypes.nonEmpty()) { |
554 } else if (mt.hasTag(FORALL) && typeargtypes.nonEmpty()) { |
555 ForAll pmt = (ForAll) mt; |
555 ForAll pmt = (ForAll) mt; |
556 if (typeargtypes.length() != pmt.tvars.length()) |
556 if (typeargtypes.length() != pmt.tvars.length()) |
557 throw inapplicableMethodException.setMessage("arg.length.mismatch"); // not enough args |
557 // not enough args |
|
558 throw inapplicableMethodException.setMessage("wrong.number.type.args", Integer.toString(pmt.tvars.length())); |
558 // Check type arguments are within bounds |
559 // Check type arguments are within bounds |
559 List<Type> formals = pmt.tvars; |
560 List<Type> formals = pmt.tvars; |
560 List<Type> actuals = typeargtypes; |
561 List<Type> actuals = typeargtypes; |
561 while (formals.nonEmpty() && actuals.nonEmpty()) { |
562 while (formals.nonEmpty() && actuals.nonEmpty()) { |
562 List<Type> bounds = types.subst(types.getBounds((TypeVar)formals.head), |
563 List<Type> bounds = types.subst(types.getBounds((TypeVar)formals.head), |