diff options
Diffstat (limited to 'tests/bugs170/pr382723/FooAspect.java')
-rw-r--r-- | tests/bugs170/pr382723/FooAspect.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/bugs170/pr382723/FooAspect.java b/tests/bugs170/pr382723/FooAspect.java new file mode 100644 index 000000000..5b5c866c5 --- /dev/null +++ b/tests/bugs170/pr382723/FooAspect.java @@ -0,0 +1,35 @@ +import java.util.AbstractList; +import java.util.LinkedList; +import java.util.List; + +abstract aspect FooAspectParent<T extends List> { + protected int getNumber(int k) { + return -1*k; + } +} + +abstract privileged aspect FooAspect<T extends AbstractList> extends FooAspectParent<T> { + pointcut pc(): call(T.new()); + + T around():pc() { + //getNumber(1); //<-- method call to superAspect fails + method(); // <-- method call to abstract local defined method fails + //localMethod(); //<-- method call to local private method fails + Math.random(); //<-- works + hashCode(); //<-- works + return null; + } + + private void localMethod(){} + + protected abstract T method(); +} + +/* +class Foo { + public LinkedList bar() { + new LinkedList(); + return null; + } +} +*/ |