equal
deleted
inserted
replaced
405 if (formals.head != varargsFormal) // not enough args |
405 if (formals.head != varargsFormal) // not enough args |
406 throw unambiguousNoInstanceException.setMessage("infer.arg.length.mismatch"); |
406 throw unambiguousNoInstanceException.setMessage("infer.arg.length.mismatch"); |
407 |
407 |
408 // for varargs arguments as well |
408 // for varargs arguments as well |
409 if (useVarargs) { |
409 if (useVarargs) { |
410 //note: if applicability check is triggered by most specific test, |
410 Type elemType = types.elemtype(varargsFormal); |
411 //the last argument of a varargs is _not_ an array type (see JLS 15.12.2.5) |
|
412 Type elemType = types.elemtypeOrType(varargsFormal); |
|
413 Type elemUndet = types.subst(elemType, tvars, undetvars); |
411 Type elemUndet = types.subst(elemType, tvars, undetvars); |
414 while (actuals.nonEmpty()) { |
412 while (actuals.nonEmpty()) { |
415 Type actual = actuals.head.baseType(); |
413 Type actual = actuals.head.baseType(); |
416 Type actualNoCapture = actualsNoCapture.head.baseType(); |
414 Type actualNoCapture = actualsNoCapture.head.baseType(); |
417 if (actual.tag == FORALL) |
415 if (actual.tag == FORALL) |