Bug 40805

Summary: call pointcut with interface type fails if method declared on interface
Product: [Tools] AspectJ Reporter: Wes Isberg <wes>
Component: CompilerAssignee: Jim Hugunin <aspectj>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: bluesoldier
Version: 1.1.0   
Target Milestone: 1.1.1   
Hardware: PC   
OS: Windows NT   
Whiteboard: Obsolete

Description Wes Isberg CLA 2003-07-25 20:19:15 EDT
test case: tests/bugs/DeclareWarningAndInterfaceMethodCW.java

given interface I defining method void m(), then

  call(void I.m())

should pick out any call to that method in any type 
implementing that method, which it does unless
(here's the bug...) an aspect also declares the method:

    aspect A {
        void I.m(){}
    }

Related side note: 

If a class also implements the method:

    class C implements I {
        void m(){}
    }

This overrides the implementation declared in A,
just as it would a superclass method.  There is 
no conflict.
Comment 1 Jim Hugunin CLA 2003-08-04 17:06:05 EDT
This is a bug.  It is caused by ResolvedTypeX.getDeclaredMethods() not returning
methods that were defined by an aspect externally.  I still need to evaluate the
risk involved in fixing this for 1.1.1.
Comment 2 Jim Hugunin CLA 2003-08-04 20:21:28 EDT
This could be fixed in the obvious way by including methods from inter-type
declarations in those searched when doing call signature matching.  It is fixed
in the tree for 1.1.1.