1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Infer.java Sat Apr 17 08:12:45 2010 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Infer.java Wed Apr 21 12:24:56 2010 +0100 1.3 @@ -287,7 +287,8 @@ 1.4 /** Instantiate method type `mt' by finding instantiations of 1.5 * `tvars' so that method can be applied to `argtypes'. 1.6 */ 1.7 - public Type instantiateMethod(List<Type> tvars, 1.8 + public Type instantiateMethod(final Env<AttrContext> env, 1.9 + List<Type> tvars, 1.10 MethodType mt, 1.11 final List<Type> argtypes, 1.12 final boolean allowBoxing, 1.13 @@ -416,6 +417,9 @@ 1.14 // check that inferred bounds conform to their bounds 1.15 checkWithinBounds(all_tvars, 1.16 types.subst(inferredTypes, tvars, inferred), warn); 1.17 + if (useVarargs) { 1.18 + chk.checkVararg(env.tree.pos(), formals); 1.19 + } 1.20 return super.inst(inferred, types); 1.21 }}; 1.22 return mt2;