aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs162
diff options
context:
space:
mode:
authoraclement <aclement>2008-08-19 21:29:19 +0000
committeraclement <aclement>2008-08-19 21:29:19 +0000
commit2b3b1260564cf3d4580771c5922c8aea8f213981 (patch)
tree0b85540e488a65370219ef8a0a2e86ecc819c312 /tests/bugs162
parent5ba47c9d786a8959f7abb053fe1b0528780d5141 (diff)
downloadaspectj-2b3b1260564cf3d4580771c5922c8aea8f213981.tar.gz
aspectj-2b3b1260564cf3d4580771c5922c8aea8f213981.zip
241047: test and fix: when pipelining we have to ask the generic type for its super interfaces as thats where they will be until it has gone through the pipeline
Diffstat (limited to 'tests/bugs162')
-rw-r--r--tests/bugs162/pr241047/case2/SomeAspect.java12
-rw-r--r--tests/bugs162/pr241047/case2/SomeBaseClass.java12
-rw-r--r--tests/bugs162/pr241047/case2/SomeInterface.java1
-rw-r--r--tests/bugs162/pr241047/case2/SomeSubClass.java8
4 files changed, 33 insertions, 0 deletions
diff --git a/tests/bugs162/pr241047/case2/SomeAspect.java b/tests/bugs162/pr241047/case2/SomeAspect.java
new file mode 100644
index 000000000..208129677
--- /dev/null
+++ b/tests/bugs162/pr241047/case2/SomeAspect.java
@@ -0,0 +1,12 @@
+public aspect SomeAspect {
+ declare parents: SomeBaseClass implements SomeInterface;
+
+ before() : execution(* (SomeInterface+).tag*(..)) {
+ System.out.println("correct advice :-)");
+ }
+
+ before() : execution(* (!SomeInterface+).tag*(..)) {
+ System.out.println("this advice should never run...");
+ }
+}
+
diff --git a/tests/bugs162/pr241047/case2/SomeBaseClass.java b/tests/bugs162/pr241047/case2/SomeBaseClass.java
new file mode 100644
index 000000000..c8514b264
--- /dev/null
+++ b/tests/bugs162/pr241047/case2/SomeBaseClass.java
@@ -0,0 +1,12 @@
+public class SomeBaseClass<Type extends Object> {
+
+ public void tag_someBaseMethod() {
+ System.out.println("some base method");
+ }
+
+ public static void main(String[] args) {
+ new SomeBaseClass<Object>().tag_someBaseMethod();
+ new SomeSubClass().tag_someMethod(); // this does not match correctly...
+ }
+}
+
diff --git a/tests/bugs162/pr241047/case2/SomeInterface.java b/tests/bugs162/pr241047/case2/SomeInterface.java
new file mode 100644
index 000000000..c6750f6a3
--- /dev/null
+++ b/tests/bugs162/pr241047/case2/SomeInterface.java
@@ -0,0 +1 @@
+public interface SomeInterface {}
diff --git a/tests/bugs162/pr241047/case2/SomeSubClass.java b/tests/bugs162/pr241047/case2/SomeSubClass.java
new file mode 100644
index 000000000..ac8f761a1
--- /dev/null
+++ b/tests/bugs162/pr241047/case2/SomeSubClass.java
@@ -0,0 +1,8 @@
+public class SomeSubClass extends SomeBaseClass<Integer> {
+
+ // this method is not matched correctly...
+ public void tag_someMethod() {
+ System.out.println("some sub method");
+ }
+}
+