Summary: | [1.5] Invalid compiler binding for qualified raw type reference | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Frederic Fusier <frederic_fusier> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | 3.1 M3 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Frederic Fusier
2004-09-23 07:50:18 EDT
Similar to bug 74544. Here problem comes from QualifiedTypeReference.getTypeBinding(Scope). Replace code: qualifiedType = this.resolvedType.isGenericType() ? scope.environment().createRawType((ReferenceBinding)this.resolvedType, qualifiedType) : (ReferenceBinding) this.resolvedType; with: ReferenceBinding currentType = (ReferenceBinding) this.resolvedType; if (this.resolvedType.isGenericType()) { qualifiedType = scope.environment().createRawType(currentType, qualifiedType); } else { qualifiedType = (qualifiedType != null && qualifiedType.isRawType()) ? scope.createParameterizedType(currentType, null, qualifiedType) : currentType; } fixes the problem Sounds like the right fix. Pls add a regression test as well in GenericTypeTest. Post M2. Previous fix does not resolve all problems... Following test case still fails with it: X.java package p; public class X<T> { class Member { class Sub {} } } Y.java package p; public class Y { p.X.Member.Sub s; p.X<Exception>.Member.Sub es = s; } We need also to test whether qualified type is a parameterized type or not: qualifiedType = (qualifiedType != null && (qualifiedType.isRawType() || qualifiedType.isParameterizedType())) Fixed. [jdt-core-internal] Test cases 308 and 309 added to GenericTypeTests Verified for 3.1M3 with build I20041101 |