aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150
diff options
context:
space:
mode:
authoraclement <aclement>2005-11-17 08:37:16 +0000
committeraclement <aclement>2005-11-17 08:37:16 +0000
commita7e84c66fc7ced725454c0135fffdb237c899403 (patch)
tree9df092ffd44b9141b15669cff9f8f0f5b1ec00e5 /tests/bugs150
parentabb5d6c097d8c0ec8f33dc95342732855148bb18 (diff)
downloadaspectj-a7e84c66fc7ced725454c0135fffdb237c899403.tar.gz
aspectj-a7e84c66fc7ced725454c0135fffdb237c899403.zip
more tests - for 115237 and alexs bug on the list.
Diffstat (limited to 'tests/bugs150')
-rw-r--r--tests/bugs150/pr115237.aj36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/bugs150/pr115237.aj b/tests/bugs150/pr115237.aj
new file mode 100644
index 000000000..f1a019b2c
--- /dev/null
+++ b/tests/bugs150/pr115237.aj
@@ -0,0 +1,36 @@
+public class pr115237 {
+ public static void main(String[] args) {
+ C c = new C();
+ c.go();
+ A a = A.aspectOf(c);
+ // ok, illegal - aspectOf only on concrete aspects?
+ // AA aa = AA.aspectOf(c);
+
+ // hmm - n/a for parameterized types?
+ BB capt = BB.aspectOf(c); // unexpected compile error here
+ //System.out.println("A " + a + " capt " + capt);
+ }
+ static class C {
+ void go() {}
+ }
+
+ abstract static aspect AA pertarget(pc()) {
+ abstract pointcut pc();
+ before() : pc() {
+ System.out.println("go()");
+ }
+ }
+ static aspect A extends AA {
+ pointcut pc() : call(void C.go());
+ }
+
+ abstract static aspect BB<T> pertarget(pc()) {
+ abstract pointcut pc();
+ before() : pc() {
+ System.out.println("go()");
+ }
+ }
+ static aspect B extends BB<C> {
+ pointcut pc() : call(void C.go());
+ }
+}