From: aclement Date: Mon, 9 May 2011 22:41:18 +0000 (+0000) Subject: 345172 X-Git-Tag: V1_6_12M1~28 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1051d6079548485d055eb224ae8aef8f13fabd9e;p=aspectj.git 345172 --- diff --git a/tests/bugs1612/pr345172/InterType.java b/tests/bugs1612/pr345172/InterType.java new file mode 100644 index 000000000..a8f808d8c --- /dev/null +++ b/tests/bugs1612/pr345172/InterType.java @@ -0,0 +1,37 @@ +import static java.lang.annotation.ElementType.*; +import java.lang.annotation.*; + +public aspect InterType { + + @Retention(RetentionPolicy.RUNTIME) + @Target({METHOD}) + public @interface MyAnnotation { + } + + public static aspect AroundMethod { + Object around() : execution(@MyAnnotation * * (..)) { + return proceed(); + } + } + + public interface InterTypeIfc {} + + // (1) + @MyAnnotation + public void InterTypeIfc.m1(int p1) {} + + // (2) + public void InterTypeIfc.m1(int p1, int p2) {} + + // (3) +// @MyAnnotation +// public void m1(int p1) {} + + // (4) +// public void m1(int p1, int p2) {} + + + public static void main(String []argv) throws Exception { + } + +} diff --git a/tests/bugs1612/pr345172/InterType2.java b/tests/bugs1612/pr345172/InterType2.java new file mode 100644 index 000000000..d442f5ee2 --- /dev/null +++ b/tests/bugs1612/pr345172/InterType2.java @@ -0,0 +1,44 @@ +import static java.lang.annotation.ElementType.*; +import java.lang.annotation.*; + +public aspect InterType2 { + + @Retention(RetentionPolicy.RUNTIME) + @Target({METHOD}) + public @interface MyAnnotation { + } + + public static aspect AroundMethod { + Object around() : execution(@MyAnnotation * * (..)) { + System.out.println(thisJoinPointStaticPart); + return proceed(); + } + } + + public interface InterTypeIfc {} + + // (1) + @MyAnnotation + public void InterTypeIfc.m1(int p1) {} + + // (2) + public void InterTypeIfc.m1(int p1, int p2) {} + + // (3) +// @MyAnnotation +// public void m1(int p1) {} + + // (4) +// public void m1(int p1, int p2) {} + + + public static void main(String []argv) throws Exception { + new Foo().m1(1); + new Foo().m1(1,2); + } + + declare parents: Foo implements InterTypeIfc; + + static class Foo { + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java index 3404939ac..fe57fe8a3 100644 --- a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java @@ -21,6 +21,14 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testIncorrectAnnos_345172() { + runTest("incorrect annos"); + } + + public void testIncorrectAnnos_345172_2() { + runTest("incorrect annos 2"); + } + public void testSyntheticMethods_327867() { runTest("synthetic methods"); } diff --git a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml index 45b8b9c51..4a9ee26a7 100644 --- a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml +++ b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml @@ -10,6 +10,30 @@ + + + + + + + + + + + + + + + + + + + + +