diff options
author | aclement <aclement> | 2011-05-09 22:41:18 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-05-09 22:41:18 +0000 |
commit | 1051d6079548485d055eb224ae8aef8f13fabd9e (patch) | |
tree | dee29b6b3ee82d661a0185b652a36a9262d61e18 /tests/bugs1612 | |
parent | aaff2d7b37944ba496412cbd586ef3efeec5692e (diff) | |
download | aspectj-1051d6079548485d055eb224ae8aef8f13fabd9e.tar.gz aspectj-1051d6079548485d055eb224ae8aef8f13fabd9e.zip |
345172
Diffstat (limited to 'tests/bugs1612')
-rw-r--r-- | tests/bugs1612/pr345172/InterType.java | 37 | ||||
-rw-r--r-- | tests/bugs1612/pr345172/InterType2.java | 44 |
2 files changed, 81 insertions, 0 deletions
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 { + } +} |