Bug 110390 - Infer Generic Type Arguments produces invalid code
Summary: Infer Generic Type Arguments produces invalid code
Status: RESOLVED DUPLICATE of bug 109059
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-22 19:53 EDT by Olivier Thomann CLA
Modified: 2005-09-26 06:26 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2005-09-22 19:53:33 EDT
Using 3.2M2, from bug 104879,

package xy;
import java.util.ArrayList;
public class LocalTest {
    void m() {
        class Local {
        	Local fSelf;
        }
        new ArrayList().add(new Local().fSelf);
    }
}

The refactoring 'Infer Generic Type Arguments' on the submitted test case
generates a code that doesn't compile.
I get:

package xy;
import java.util.ArrayList;

import xy.LocalTest.98.Local;

public class LocalTest {
    void m() {
        class Local {
        	Local fSelf;
        }
        new ArrayList<Local>().add(new Local().fSelf);
    }
}

The import statement is invalid.
Comment 1 Markus Keller CLA 2005-09-26 06:26:52 EDT
Oops, sorry. I have forgotten to mention in bug 104879 that I already filed bug
109059 for this problem. Marking as dup.

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