diff options
Diffstat (limited to 'tests/bugs153/pr161502/Main.java')
-rw-r--r-- | tests/bugs153/pr161502/Main.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/bugs153/pr161502/Main.java b/tests/bugs153/pr161502/Main.java new file mode 100644 index 000000000..81a1eae09 --- /dev/null +++ b/tests/bugs153/pr161502/Main.java @@ -0,0 +1,34 @@ +import java.util.ArrayList; +import java.util.List; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; + +public class Main { + + public List<? extends Element> getElements() { + return new ArrayList<Element>(); + } + + class Element {}; + + @Aspect + static abstract class Base<T> { + @Around("call(List<? extends T> *.*(..))") + public List<? extends T> elementList(ProceedingJoinPoint thisJoinPoint) { + try { + return (List<? extends T>)thisJoinPoint.proceed(); + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + } + + @Aspect + static class Concrete extends Base<Element> {} + + public static void main(String[] args) { + new Main().getElements(); + } + +}
\ No newline at end of file |