Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2017-10-25 06:02:04 +0000
committerTill Brychcy2017-10-25 06:02:04 +0000
commitb4703cd3177b31f98429d60ab965ab16955ecd20 (patch)
treed4a239ca59e21b3f7748085be51c16a8ac96eaba
parent143b17c103956858fc3a331c687d4e89e8148cdd (diff)
downloadeclipse.jdt.core-I20171030-0400.tar.gz
eclipse.jdt.core-I20171030-0400.tar.xz
eclipse.jdt.core-I20171030-0400.zip
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java
index 632fb8280b..3298610fd5 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java
@@ -6141,5 +6141,28 @@ public void testBug521212() {
"Bound mismatch: The type ? extends V is not a valid substitute for the bounded parameter <U extends Z> of the type Y<U>\n" +
"----------\n");
}
+public void testBug526423() {
+ runConformTest(
+ new String[] {
+ "test/compileBug/TestCompileBug.java",
+ "package test.compileBug;\n" +
+ "\n" +
+ "import java.util.ArrayList;\n" +
+ "import java.util.LinkedHashMap;\n" +
+ "import java.util.List;\n" +
+ "import java.util.Map;\n" +
+ "import java.util.Map.Entry;\n" +
+ "\n" +
+ "public class TestCompileBug {\n" +
+ " @SuppressWarnings({ \"rawtypes\" })\n" +
+ " private static void cannotCompile(Object token) {\n" +
+ " // change the type to List<Entry> and ArrayList<Entry> and it compiles\n" +
+ " @SuppressWarnings(\"unchecked\")\n" +
+ " List<Map.Entry> identityServicesToTokensMap = new ArrayList<Map.Entry>(((LinkedHashMap) token).entrySet());\n" +
+ " }\n" +
+ "}"
+ }
+ );
+}
}

Back to the top