diff options
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java')
-rw-r--r-- | org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java index 47beae1a92..d1ddc6b84a 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java @@ -56,7 +56,7 @@ public class GenericTypeTest extends AbstractComparableTest { // Static initializer to specify tests subset using TESTS_* static variables // All specified tests which does not belong to the class are skipped... static { -// TESTS_NAMES = new String[] { "test1277" }; +// TESTS_NAMES = new String[] { "test0593" }; // TESTS_NUMBERS = new int[] { 470, 627 }; // TESTS_RANGE = new int[] { 1097, -1 }; } @@ -5401,7 +5401,7 @@ public class GenericTypeTest extends AbstractComparableTest { customOptions); } public void test0178a() { - if (this.complianceLevel < ClassFileConstants.JDK14) + if (this.complianceLevel < ClassFileConstants.JDK15) return; Map customOptions = getCompilerOptions(); customOptions.put(CompilerOptions.OPTION_EnablePreviews, CompilerOptions.ENABLED); @@ -5421,7 +5421,7 @@ public class GenericTypeTest extends AbstractComparableTest { " return t;\n" + " } else if (t instanceof T) {\n" + " return t;\n" + - " } else if (t instanceof X) { // this is allowed since Java 14 as preview feature\n" + + " } else if (t instanceof X) { // this is allowed since Java 15 as preview feature\n" + " return t;\n" + " }\n" + " return null;\n" + @@ -18808,6 +18808,7 @@ X.java:6: name clash: <T#1>foo(Object) and <T#2>foo(Object) have the same erasur public void test0593() { Map options = getCompilerOptions(); options.put(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, JavaCore.IGNORE); + String bounds = isJRE15Plus ? "Object&Serializable&Comparable<?>&Constable" : "Object&Serializable&Comparable<?>"; String xSource = "import java.util.*;\n" + "public class X {\n" + @@ -18824,7 +18825,7 @@ X.java:6: name clash: <T#1>foo(Object) and <T#2>foo(Object) have the same erasur "1. ERROR in X.java (at line 3)\n" + " List<Class<?>> classes1 = Arrays.asList(String.class, Boolean.class);\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from List<Class<? extends Object&Serializable&Comparable<?>>> to List<Class<?>>\n" + + "Type mismatch: cannot convert from List<Class<? extends " + bounds + ">> to List<Class<?>>\n" + "----------\n", null, true, |