--- /dev/null
+
+public class DeclareParentsPrecedenceTest {
+ public static void main(String[]argv) {
+ TestClass t = new TestClass();
+ if (!(t instanceof Interface1)) throw new RuntimeException("t not instanceof Interface1");
+ if (!(t instanceof Interface1TestClass)) throw new RuntimeException("t not instanceof Interface1TestClass");
+ }
+}
--- /dev/null
+interface Interface1 {}
--- /dev/null
+interface Interface1TestClass {}
--- /dev/null
+aspect TestAspect {
+ declare parents:
+ TestClass implements Interface1;
+
+ declare parents:
+ TestClass && Interface1+ implements Interface1TestClass;
+}
--- /dev/null
+class TestClass {}
--- /dev/null
+
+package test;
+
+public class X {
+ public static void main(String[]argv) {
+ TestClass t = new TestClass();
+ if (!(t instanceof Interface1)) throw new RuntimeException("t not instanceof Interface1");
+ if (!(t instanceof Interface1TestClass)) throw new RuntimeException("t not instanceof Interface1TestClass");
+ }
+}
+
+interface Interface1 {}
+
+interface Interface1TestClass {}
+
+aspect TestAspect {
+ declare parents:
+ TestClass implements Interface1;
+
+ declare parents:
+ TestClass && Interface1+ implements Interface1TestClass;
+}
+class TestClass {}
--- /dev/null
+
+public class Y {
+ public static void main(String[]argv) {
+ TestClass t = new TestClass();
+ if (!(t instanceof Interface1)) throw new RuntimeException("t not instanceof Interface1");
+ if (!(t instanceof Interface1TestClass)) throw new RuntimeException("t not instanceof Interface1TestClass");
+ }
+}
+
+interface Interface1 {}
+
+interface Interface1TestClass {}
+
+aspect TestAspect {
+ declare parents: TestClass implements Interface1;
+
+ declare parents: TestClass && Interface1+ implements Interface1TestClass;
+}
+
+class TestClass {}
public void testGenericsSuperITD_pr206911() { runTest("generics super itd"); }
public void testGenericsSuperITD_pr206911_2() { runTest("generics super itd - 2"); }
public void testSerializationAnnotationStyle_pr216311() { runTest("serialization and annotation style");}
-
+ public void testDecpRepetition_pr214559() { runTest("decp repetition problem");} // all code in one file
+ public void testDecpRepetition_pr214559_2() { runTest("decp repetition problem - 2");} // all code in one file, default package
+ public void testDecpRepetition_pr214559_3() { runTest("decp repetition problem - 3");} // across multiple files
+
/////////////////////////////////////////
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc160Tests.class);
<compile options="-1.5" files="PersistabilityTest.java,IPersistable.java,Persistability.java"/>
<run class="PersistabilityTest"/>
</ajc-test>
+
+ <ajc-test dir="bugs160/pr214559" title="decp repetition problem">
+ <compile files="X.java"/>
+ <run class="test.X"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs160/pr214559" title="decp repetition problem - 2">
+ <compile files="Y.java"/>
+ <run class="Y"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs160/pr214559" title="decp repetition problem - 3">
+ <compile files="TestClass.java Interface1.java Interface1TestClass.java DeclareParentsPrecedenceTest.java TestAspect.java"/>
+ <run class="DeclareParentsPrecedenceTest"/>
+ </ajc-test>
</suite>
\ No newline at end of file