aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150
diff options
context:
space:
mode:
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());
+ }
+}