Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338428 - Code generator outputs duplicate delegate methods
Summary: Code generator outputs duplicate delegate methods
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-28 11:11 EST by Konstantin Komissarchik CLA
Modified: 2021-11-19 09:22 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Komissarchik CLA 2011-02-28 11:11:03 EST
1. Create a model element IFoo and define a @DelegateImpl method.
2. Create model elements IFooExt1 and IFooExt2 that extend IFoo.
3. Create a model element IBar that extends both IFooExt1 and IFooExt2.
4. Add @GenerateImpl to IBar.

The generate Bar implementation class will be flagged as having errors by the Java compiler as the delegate method will be present twice. 

The issue is that the code generator is not tracking interfaces already visited when scanning the type tree for delegated methods.
Comment 1 Konstantin Komissarchik CLA 2011-02-28 11:12:50 EST
Fixed.
Comment 2 Ling Hao CLA 2011-06-08 20:16:31 EDT
Verified by creating test case as outlined.