langtools/test/tools/javac/lambda/LambdaParserTest.java
changeset 14725 65836e833f59
parent 14547 86d8d242b0c4
child 15040 99fd9483d3f0
--- a/langtools/test/tools/javac/lambda/LambdaParserTest.java	Fri Nov 30 15:14:36 2012 +0000
+++ b/langtools/test/tools/javac/lambda/LambdaParserTest.java	Fri Nov 30 15:14:48 2012 +0000
@@ -90,9 +90,14 @@
     enum LambdaParameterKind {
         IMPLICIT(""),
         EXPLIICT_SIMPLE("A"),
+        EXPLIICT_SIMPLE_ARR1("A[]"),
+        EXPLIICT_SIMPLE_ARR2("A[][]"),
         EXPLICIT_VARARGS("A..."),
         EXPLICIT_GENERIC1("A<X>"),
-        EXPLICIT_GENERIC3("A<? extends X, ? super Y>");
+        EXPLICIT_GENERIC2("A<? extends X, ? super Y>"),
+        EXPLICIT_GENERIC2_VARARGS("A<? extends X, ? super Y>..."),
+        EXPLICIT_GENERIC2_ARR1("A<? extends X, ? super Y>[]"),
+        EXPLICIT_GENERIC2_ARR2("A<? extends X, ? super Y>[][]");
 
         String parameterType;
 
@@ -103,6 +108,11 @@
         boolean explicit() {
             return this != IMPLICIT;
         }
+
+        boolean isVarargs() {
+            return this == EXPLICIT_VARARGS ||
+                    this == EXPLICIT_GENERIC2_VARARGS;
+        }
     }
 
     enum ModifierKind {
@@ -253,7 +263,7 @@
 
         if (lk.arity() == 2 &&
                 (pk1.explicit() != pk2.explicit() ||
-                pk1 == LambdaParameterKind.EXPLICIT_VARARGS)) {
+                pk1.isVarargs())) {
             errorExpected = true;
         }