Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2012-10-18 23:40:12 +0000
committerStephan Herrmann2012-10-18 23:40:12 +0000
commit411af95cda68f80620d183a9726a7b23475fc415 (patch)
tree5f500b64469d25bf9ff7856c1a80fb085b57efd6 /testplugins
parent26763a32a6b9015482e767ab5d39c8e16682445e (diff)
downloadorg.eclipse.objectteams-411af95cda68f80620d183a9726a7b23475fc415.tar.gz
org.eclipse.objectteams-411af95cda68f80620d183a9726a7b23475fc415.tar.xz
org.eclipse.objectteams-411af95cda68f80620d183a9726a7b23475fc415.zip
Bug 391876 - false-report (nested class): interface cannot be
implemented more than once
Diffstat (limited to 'testplugins')
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java43
1 files changed, 42 insertions, 1 deletions
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java
index 033c5b0bb..a4a342423 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java
@@ -40,7 +40,7 @@ public class ReportedBugs extends AbstractOTJLDTest {
// 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[] { "testBug372786"};
+// TESTS_NAMES = new String[] { "testBug391876"};
// TESTS_NUMBERS = new int[] { 1459 };
// TESTS_RANGE = new int[] { 1097, -1 };
}
@@ -5251,4 +5251,45 @@ public class ReportedBugs extends AbstractOTJLDTest {
getClassLibraries("bug372786.jar"),
false);
}
+
+ // Bug 391876 - false-report (nested class): interface cannot be implemented more than once
+ // bogus error seen: the interface NonUniqueIndex cannot be implemented more than once[...]
+ public void testBug391876() {
+ runConformTest(
+ new String[] {
+ "p/Entity.java",
+ "package p;\n" +
+ "public interface Entity{}\n",
+ "p/Index.java",
+ "package p;\n" +
+ "public interface Index<T extends Entity> {}\n",
+ "p/NonUniqueIndex.java",
+ "package p;\n" +
+ "public interface NonUniqueIndex<V extends Entity, T> extends Index<V> {}\n",
+ "p/User.java",
+ "package p;\n" +
+ "public interface User extends Entity {}",
+ "p/UserByCustomerIndex.java",
+ "package p;\n" +
+ "public interface UserByCustomerIndex extends NonUniqueIndex<User, UserByCustomerIndex.UserByCustomerKey> {\n" +
+ " class UserByCustomerKey {}\n" +
+ "}",
+ "p3/NonUniqueIndexImpl.java",
+ "package p3;\n" +
+ "import p.*;\n" +
+ "public class NonUniqueIndexImpl<V extends Entity, T> implements NonUniqueIndex<V, T> {}\n",
+ },
+ "");
+ runConformTest(
+ new String[] {
+ "p2/UserByCustomerIndexImpl.java",
+ "package p2;\n" +
+ "import p.*;\n" +
+ "import p3.NonUniqueIndexImpl;\n" +
+ "public class UserByCustomerIndexImpl \n" +
+ " extends NonUniqueIndexImpl<User, UserByCustomerIndex.UserByCustomerKey>\n" +
+ " implements UserByCustomerIndex {}\n",
+ },
+ "", null, false/*flush*/, null);
+ }
}

Back to the top