From 71608e1577185ba16a587a09f1e5bd60e08bf307 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 12 May 2011 19:55:28 +0000 Subject: [PATCH] 345172 --- tests/bugs1612/pr345172/InterType3.java | 44 +++++++++++++++++++ .../systemtest/ajc1612/Ajc1612Tests.java | 8 ++++ .../aspectj/systemtest/ajc1612/ajc1612.xml | 14 ++++++ 3 files changed, 66 insertions(+) create mode 100644 tests/bugs1612/pr345172/InterType3.java diff --git a/tests/bugs1612/pr345172/InterType3.java b/tests/bugs1612/pr345172/InterType3.java new file mode 100644 index 000000000..7e88245c4 --- /dev/null +++ b/tests/bugs1612/pr345172/InterType3.java @@ -0,0 +1,44 @@ +import static java.lang.annotation.ElementType.*; +import java.lang.annotation.*; + +public aspect InterType3 { + + @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, String p2) {} + + // (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,"a"); + 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 fe57fe8a3..eacd2b7ab 100644 --- a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java @@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + // public void testAnnoCopying_345515() { + // runTest("anno copying"); + // } + public void testIncorrectAnnos_345172() { runTest("incorrect annos"); } @@ -29,6 +33,10 @@ public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("incorrect annos 2"); } + public void testIncorrectAnnos_345172_3() { + runTest("incorrect annos 3"); + } + 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 4a9ee26a7..2b296fa81 100644 --- a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml +++ b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml @@ -2,6 +2,11 @@ + + + + + @@ -32,6 +37,15 @@ + + + + + + + + + -- 2.39.5