Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2017-03-10 20:55:07 +0000
committerTill Brychcy2017-04-15 14:53:20 +0000
commit90d7a482ab40b7c03970e70766cdc7419fd23c2e (patch)
treefc652ea681269c907bb3c3245b064a4539d379cd
parentfe52650a61fccd4273defc59b15afbb82a1f49cf (diff)
downloadeclipse.jdt.core-90d7a482ab40b7c03970e70766cdc7419fd23c2e.tar.gz
eclipse.jdt.core-90d7a482ab40b7c03970e70766cdc7419fd23c2e.tar.xz
eclipse.jdt.core-90d7a482ab40b7c03970e70766cdc7419fd23c2e.zip
Bug 508799 - Incremental compile produces invalid errorsI20170416-2000I20170415-2000
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest.java48
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java2
2 files changed, 49 insertions, 1 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 8375b7bdab..beee136786 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
@@ -6013,5 +6013,53 @@ public void testBug469297() {
"----------\n");
}
}
+public void testBug508799() {
+ Map customOptions = getCompilerOptions();
+ customOptions.put(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE, JavaCore.IGNORE);
+ runConformTest(
+ new String[] {
+ "test/A.java",
+ "package test;\n" +
+ "\n" +
+ "public interface A<T extends Iterable> {\n" +
+ " void a();\n" +
+ "}\n" +
+ "",
+ "test/B1.java",
+ "package test;\n" +
+ "\n" +
+ "public interface B1 extends A<Iterable> {\n" +
+ " void b1();\n" +
+ "}\n" +
+ "",
+ "test/B2.java",
+ "package test;\n" +
+ "\n" +
+ "public interface B2 extends A<Iterable> {\n" +
+ " void b2();\n" +
+ "}\n" +
+ "",
+ },
+ customOptions
+ );
+ runConformTest(false,
+ new String[] {
+ "test/C.java",
+ "package test;\n" +
+ "\n" +
+ "public class C implements B1, B2 {\n" +
+ " public void a() {\n" +
+ " }\n" +
+ "\n" +
+ " public void b1() {\n" +
+ " }\n" +
+ "\n" +
+ " public void b2() {\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ }, null, customOptions, "", "", "", null
+ );
+}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
index 965f055739..e01b439ea5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
@@ -79,7 +79,7 @@ public class TypeSystem {
public int hashCode() {
int hashCode = this.type.hashCode() + 13 * (this.enclosingType != null ? this.enclosingType.hashCode() : 0);
for (int i = 0, length = this.arguments == null ? 0 : this.arguments.length; i < length; i++) {
- hashCode += (i + 1) * this.arguments[i].id * this.arguments[i].hashCode();
+ hashCode += (i + 1) * this.arguments[i].hashCode();
}
return hashCode;
}

Back to the top