langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
changeset 5489 e7af65bf7577
parent 5321 c8efe769cb3b
child 5520 86e4b9a9da40
child 5648 e8aa492874b5
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Sat Apr 17 08:12:45 2010 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Wed Apr 21 12:24:56 2010 +0100
@@ -677,6 +677,19 @@
         }
     }
 
+    /**
+     * Check that vararg method call is sound
+     * @param pos Position to be used for error reporting.
+     * @param argtypes Actual arguments supplied to vararg method.
+     */
+    void checkVararg(DiagnosticPosition pos, List<Type> argtypes) {
+        Type argtype = argtypes.last();
+        if (!types.isReifiable(argtype))
+            warnUnchecked(pos,
+                              "unchecked.generic.array.creation",
+                              argtype);
+    }
+
     /** Check that given modifiers are legal for given symbol and
      *  return modifiers together with any implicit modififiers for that symbol.
      *  Warning: we can't use flags() here since this method