Bug 110948 - False "Duplicate methods" error with overridden ITD in a subclassed aspect
Summary: False "Duplicate methods" error with overridden ITD in a subclassed aspect
Status: RESOLVED DUPLICATE of bug 115788
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 1.5.0RC1   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-28 11:49 EDT by attila lendvai CLA
Modified: 2005-11-18 11:21 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description attila lendvai CLA 2005-09-28 11:49:15 EDT
As you can (hopefully) see the error message is the same twice. The situation: 
aspect A ITD's actionPerformed; aspect B specializes aspect A and overrides the 
ITD'd actionPerformed. It was working fine before a few developer builds before.

GridScreen.java:11 [error] Duplicate methods named actionPerformed with the 
parameters (ActionEvent) and (ActionEvent) are defined by the type 
HidingMessagesMixin.IHidingMessages
     [iajc] public class GridScreen extends Grid
     [iajc]              ^^^^^^^^^
GridScreen.java:11 [error] Duplicate methods named actionPerformed with the 
parameters (ActionEvent) and (ActionEvent) are defined by the type 
HidingMessagesMixin.IHidingMessages
     [iajc] public class GridScreen extends Grid
     [iajc]              ^^^^^^^^^
Comment 1 attila lendvai CLA 2005-09-30 10:51:39 EDT
FYI, i'm trying to create a small testcase to reproduce the bug but i keep on 
failing... :| the scenario in the description works fine.
Comment 2 Andrew Clement CLA 2005-09-30 11:35:15 EDT
Are any java generics involved in this or is it just regular java?
Comment 3 attila lendvai CLA 2005-09-30 12:34:42 EDT
This is regular Java that compiles with the 1.2 version.

I've successfully compiled the code about a month ago with the developer build, 
but i wasn't following the dev builds because it fails with another project.

Some dev builds had problems with other ITD's that got fixed meanwhile.

The situation involves a tree of abstract aspects that mostly ITD'd stuff trough 
a tree of interfaces (Mixins). Some nodes are concretized. Two nodes ITD's two 
actionPerformed() method, one overrides the other and calls super.
actionPerformed().

I only could reproduce some valid conflicting ITD errors messages, some Object 
does not understand actionPerformed() errors (which i couldn't understand why 
happened) but i couldn't reproduce the duplicate method error...

Some time ago I suggested that if the compiler logged what happens then maybe 
errors like this could be analized more easily. Maybe.
Comment 4 Andrew Clement CLA 2005-10-28 03:41:06 EDT
Hi, sorry I'm slow looking at this.

Is there any way you can send me the .class file for
HidingMessagesMixin.IHidingMessages which contains the duplicates and perhaps
the aspect with the original ITDs in?  (Send it privately if attaching to
bugzilla isnt appropriate) - this is of course if its still happening on recent
AJ builds, we are heading for the AJ5 release candidate and I'd really hate if
it didn't work for you!

(We have other bugs about improving the diagnostics from AJ.)

Comment 5 Andrew Clement CLA 2005-11-03 10:21:03 EST
I'm tinkering around trying to recreate this again.  From the original description:

"aspect A ITD's actionPerformed; 
aspect B specializes aspect A and overrides the ITD'd actionPerformed."

Do you mean:

abstract aspect A {
  public void SomeClass.actionPerformed() {}
}

aspect B extends A {
  public void SomeClass.actionPerformed() {}
}

this works for me.  I wonder what I'm doing differently to you?
Comment 6 Andrew Clement CLA 2005-11-09 02:51:33 EST
I'm going to have to close this as unrecreatable - if there is something here I
would like to get it fixed for RC1 but I just can't make it happen.  Please
reopen if you still have this problem.
Comment 7 Andrew Clement CLA 2005-11-15 06:40:03 EST
i have a testcase for this now and have recreated it!! see bug 115788
Comment 8 Andrew Clement CLA 2005-11-18 11:21:47 EST
I'm going to fix this under 115788 as I have a working testcase for that bug.

*** This bug has been marked as a duplicate of 115788 ***