Summary: | [itds] Problem calling super from ITDs in an overrides relationship | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Ron Bodkin <rbodkin+LISTS> |
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | aclement |
Version: | 1.5.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Ron Bodkin
2006-04-02 18:45:23 EDT
Hoisting priority - runtime errors are the worst kind of failure. Not sure what this comment means "I don't think it's possible with the current Java bytecode definition". With a fix in the weaver, this program now compiles and runs fine... The problem is with generating a helper method for the toString() method invoked via BeanBean.describe(). Because the ITDs are on interfaces, when we put the implementation of the describe method on the implementing class ( the anonymous class created here "new DerivedBean() {}.describe();" ) then the subITD is overriding the superITD - we have correctly worked this out, but because the superITD is forgotten, we also forget that it called 'super.toString()' and needed a method generated to support that call. The solution is for an ITD to remember which ITDs it is overriding - that way when the code is eventually generated in the target class, we can see if it was overriding any other ITDs that also needed methods generating. Great - I'm glad it's possible to support proper inheritance of ITD methods. My comment was just a guess that maybe this wasn't supported because it couldn't be. Thanks for the fix. ought to get around to this unsetting the target field which is currently set for something already released |