Summary: | [refactoring] CCE in Infer type argument refactoring | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> | ||||
Component: | UI | Assignee: | Markus Keller <markus.kell.r> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | neil, Olivier_Thomann | ||||
Version: | 3.1.1 | ||||||
Target Milestone: | 3.3 M1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Bug Depends on: | 110811 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Martin Aeschlimann
2005-09-26 10:22:28 EDT
Created attachment 27511 [details]
updated ASTNode.java
Self-contained example: package dom; import java.util.AbstractList; import java.util.Iterator; public class ASTNode { abstract class NodeList<E extends ASTNode> extends AbstractList<E> { abstract class Cursor implements Iterator { } } final void acceptChildren(ASTNode.NodeList children) { NodeList.Cursor cursor; } } The problem is that the reference NodeList.Cursor is raw, but its typeDeclaration is not generic as expected, but a standard type. I'll investigate, but I don't think that's for 3.1.1. An even smaller example: public class NodeList<E> { class Cursor { } // type declaration is a standard type { NodeList.Cursor cursor; // NodeList.Cursor is raw! NodeList<String>.Cursor c2; // NodeList<String>.Cursor is standard type } } TTypes currently assume that the type declaration of a raw type is a generic type, which is not the case here. I think that's against the current spec: For parameterized types and raw types, getTypeDeclaration() returns the binding for the corresponding generic type. We have to sort out whether the spec or the implementation should be corrected. *** Bug 134761 has been marked as a duplicate of this bug. *** Fixed CCE in HEAD. Treating non-generic member type of generic type like other non-generic types for now. Opened bug 149541 for the full fix. |