297 List<Type> argtypes, |
297 List<Type> argtypes, |
298 List<Type> typeargtypes, |
298 List<Type> typeargtypes, |
299 boolean allowBoxing, |
299 boolean allowBoxing, |
300 boolean useVarargs, |
300 boolean useVarargs, |
301 Warner warn) |
301 Warner warn) |
302 throws Infer.NoInstanceException { |
302 throws Infer.InferenceException { |
303 if (useVarargs && (m.flags() & VARARGS) == 0) return null; |
303 if (useVarargs && (m.flags() & VARARGS) == 0) return null; |
304 Type mt = types.memberType(site, m); |
304 Type mt = types.memberType(site, m); |
305 |
305 |
306 // tvars is the list of formal type variables for which type arguments |
306 // tvars is the list of formal type variables for which type arguments |
307 // need to inferred. |
307 // need to inferred. |
368 boolean useVarargs, |
368 boolean useVarargs, |
369 Warner warn) { |
369 Warner warn) { |
370 try { |
370 try { |
371 return rawInstantiate(env, site, m, argtypes, typeargtypes, |
371 return rawInstantiate(env, site, m, argtypes, typeargtypes, |
372 allowBoxing, useVarargs, warn); |
372 allowBoxing, useVarargs, warn); |
373 } catch (Infer.NoInstanceException ex) { |
373 } catch (Infer.InferenceException ex) { |
374 return null; |
374 return null; |
375 } |
375 } |
376 } |
376 } |
377 |
377 |
378 /** Check if a parameter list accepts a list of args. |
378 /** Check if a parameter list accepts a list of args. |
582 case ABSENT_MTH: return wrongMethod.setWrongSym(sym); |
582 case ABSENT_MTH: return wrongMethod.setWrongSym(sym); |
583 case WRONG_MTH: return wrongMethods; |
583 case WRONG_MTH: return wrongMethods; |
584 default: return bestSoFar; |
584 default: return bestSoFar; |
585 } |
585 } |
586 } |
586 } |
587 } catch (Infer.NoInstanceException ex) { |
587 } catch (Infer.InferenceException ex) { |
588 switch (bestSoFar.kind) { |
588 switch (bestSoFar.kind) { |
589 case ABSENT_MTH: |
589 case ABSENT_MTH: |
590 return wrongMethod.setWrongSym(sym, ex.getDiagnostic()); |
590 return wrongMethod.setWrongSym(sym, ex.getDiagnostic()); |
591 case WRONG_MTH: |
591 case WRONG_MTH: |
592 return wrongMethods; |
592 return wrongMethods; |