@@ -0,0 +1,6 @@ | |||
package a.b.c; | |||
public class A { | |||
public static void m() {System.err.println("static method running");} | |||
} |
@@ -0,0 +1,6 @@ | |||
import static a.b.c.A.m; | |||
public class I1 { | |||
public static void main(String []argv) { | |||
m(); | |||
} | |||
} |
@@ -0,0 +1,9 @@ | |||
import static a.b.c.A.*; | |||
public class I2 { | |||
public static void main(String []argv) { | |||
m(); | |||
} | |||
} |
@@ -178,6 +178,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
runTest("NPE in reflect implementation"); | |||
} | |||
public void testStaticImports_pr84260() { | |||
runTest("static import failures"); | |||
} | |||
// helper methods..... | |||
public SyntheticRepository createRepos(File cpentry) { |
@@ -51,6 +51,20 @@ | |||
</compile> | |||
</ajc-test> | |||
<ajc-test dir="bugs150/pr84260" vm="1.5" title="static import failures"> | |||
<compile files="A.java,I1.java,I2.java" options="-1.5"/> | |||
<run class="I1"> | |||
<stderr> | |||
<line text="static method running"/> | |||
</stderr> | |||
</run> | |||
<run class="I2"> | |||
<stderr> | |||
<line text="static method running"/> | |||
</stderr> | |||
</run> | |||
</ajc-test> | |||
<ajc-test dir="decp" pr="80249" title="Order of types passed to compiler determines weaving behavior"> | |||
<compile files="A.java,B.java,AspectX.java"/> | |||
<run class="B"/> |