Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] dynamic binding issue

I have the following interface:
 
interface Visitor {
    public void visit(Element e);
}
 
where Element extends AbstractElement.
 
I also have the following aspect:
 
aspect Visiting {
    public void AbstractElement.visit(Visitor v) {
        v.visit(this);
    }
}
 
When I try to compiler the program I get the following error:
 
The method visit(Element) in the type Visitor is not applicable for the arguments (AbstractElement)
return visitor.visit(this);
 
Must I check the type of this in the inter-type declration and manually cast to the correct subtype?
 
Eric M.


Back to the top