langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
changeset 5489 e7af65bf7577
parent 3778 38a70273507b
child 5520 86e4b9a9da40
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Sat Apr 17 08:12:45 2010 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Wed Apr 21 12:24:56 2010 +0100
@@ -287,7 +287,8 @@
     /** Instantiate method type `mt' by finding instantiations of
      *  `tvars' so that method can be applied to `argtypes'.
      */
-    public Type instantiateMethod(List<Type> tvars,
+    public Type instantiateMethod(final Env<AttrContext> env,
+                                  List<Type> tvars,
                                   MethodType mt,
                                   final List<Type> argtypes,
                                   final boolean allowBoxing,
@@ -416,6 +417,9 @@
                     // check that inferred bounds conform to their bounds
                     checkWithinBounds(all_tvars,
                            types.subst(inferredTypes, tvars, inferred), warn);
+                    if (useVarargs) {
+                        chk.checkVararg(env.tree.pos(), formals);
+                    }
                     return super.inst(inferred, types);
             }};
             return mt2;