aboutsummaryrefslogtreecommitdiffstats
path: root/tests/errors/AspectInheritance3.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errors/AspectInheritance3.java')
-rw-r--r--tests/errors/AspectInheritance3.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/errors/AspectInheritance3.java b/tests/errors/AspectInheritance3.java
new file mode 100644
index 000000000..142de669c
--- /dev/null
+++ b/tests/errors/AspectInheritance3.java
@@ -0,0 +1,32 @@
+public class AspectInheritance3 {
+ public static void main(String[] args) {
+ }
+}
+
+
+abstract aspect Base {
+ abstract pointcut targets(int i, C c);
+
+ after(int i, C c): targets(i, c) {
+ //
+ }
+}
+aspect GoodConcrete extends Base {
+ pointcut targets(int i, C c);
+}
+
+// this aspect is illegal because concrete-concrete extension is illegal
+aspect DoubleConcrete extends GoodConcrete {
+}
+
+aspect OtherAspect {
+ // can't reference an abstract pointcut using a static reference
+ before(): Base.targets(int, C) { }
+}
+
+
+class C {
+ public void m(int i) { }
+}
+
+class SubC extends C {}