You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Bug2.java 595B

12345678910111213141516171819202122232425
  1. aspect MyAspect implements MyInterface<MyClass> {
  2. before() : MyAspect1<MyClass>.myPointcutInInterface(){ }
  3. }
  4. class MyClass {}
  5. interface MyInterface<T>{
  6. public abstract static aspect MyAspect1<T> {
  7. public final pointcut myPointcutInInterface() : call(T *(..));
  8. }
  9. }
  10. public class Bug2 {
  11. public static void main(MyClass[]argv) {
  12. new Bug2().callit();
  13. }
  14. public MyClass callit() {
  15. return null;
  16. }
  17. }
  18. aspect MyAspect2 implements MyInterface<String> {
  19. before(): MyAspect1<String>.myPointcutInInterface() {} // shouldn't match... since the return type of callit is MyClass
  20. }