Summary: | [plan][1.5] Unidentical bindings for declaration of and reference to Class.MethodArray | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | mlists |
Version: | 3.1 | ||
Target Milestone: | 3.2 M4 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Markus Keller
2005-01-18 04:32:28 EST
This is probably the same problem: The bindings for declaration and reference to "value" have the same key but are not identical: class A<E> { @I(12) @interface I { @I(value=13) int value(); } } Simpler test case: public class X<T> { static class Y { Y y; } } The binding for the field's type Y is a ParameterizedTypeBinding with no argument. The binding for the class declaration Y is a MemberTypeBinding. Their genericTypeSignature() is the same. It isn't clear yet if the compiler's bindings are going to change to be consistent, or if we will work around this in the DOM AST bindings. Y declaration is MemberTypeBinding, where field type is ParameterizedTypeBinding with null arguments, and raw X enclosing type (since Y is static). *** Bug 83228 has been marked as a duplicate of this bug. *** Defer To be considered for 3.1 M4 I meant 3.2 M4 Declarations are still going to be associated with generic types (SourceTypeBinding), but references will be made consistent; i.e. references to generic types from within body of this type are no longer SourceTypeBinding in cases. I believe the situation we see here will not be affected. Clients have to figure whether they consider a type reference or a type declaration; but at least now, all type references will look the same, no matter where they reside. Jerome: This being said, the binding key should likely tell the difference. Changed the binding key for parameterized type with a raw enclosing type to include "<>". Added regression test ASTConverter15Test#test204/205 Verified for 3.2 M4 using build I20051212-0010 |