--- /dev/null
+interface X {
+ static aspect IMPL {
+ public void X.test() { System.out.println("X.test()"); }
+ }
+}
+
+interface Y {
+ static aspect IMPL {
+ declare precedence : X.IMPL, Y.IMPL;
+
+ public void Y.test() { System.out.println("Y.test()"); }
+ }
+}
+
+public class Z implements X, Y {
+ public static void main(String[] args) throws Exception { new Z().test(); }
+}
--- /dev/null
+interface X {
+ static aspect IMPL {
+ public void X.test() { System.out.println("X.test()"); }
+ }
+}
+
+interface Y {
+ static aspect IMPL {
+ declare precedence : Y.IMPL, X.IMPL;
+
+ public void Y.test() { System.out.println("Y.test()"); }
+ }
+}
+
+public class Z2 implements X, Y {
+ public static void main(String[] args) throws Exception { new Z2().test(); }
+}
public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// AspectJ1.6.1
+ public void testITDPrecedence_pr233838_1() { runTest("itd precedence - 1"); }
+ public void testITDPrecedence_pr233838_2() { runTest("itd precedence - 2"); }
public void testGetFieldGenerics_pr227401() { runTest("getfield problem with generics");}
public void testGenericAbstractAspects_pr231478() { runTest("generic abstract aspects"); }
public void testFieldJoinpointsAndAnnotationValues_pr227993() { runTest("field jp anno value"); }
<!-- AspectJ v1.6.1 Tests -->
<suite>
+ <ajc-test dir="bugs161/pr233838" title="itd precedence - 1">
+ <compile files="Z.java" options="-1.5"/>
+ <run class="Z">
+ <stdout>
+ <line text="X.test()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs161/pr233838" title="itd precedence - 2">
+ <compile files="Z2.java" options="-1.5"/>
+ <run class="Z2">
+ <stdout>
+ <line text="Y.test()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+
<ajc-test dir="bugs161/pr227401" title="getfield problem with generics">
<compile files="Instrumentation.java Fails.java" options="-1.5"/>
<run class="Fails">