Bug 173849

Summary: ITypeBinding#getJavaElement() fails for array of inner type
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2007-02-12 06:02:09 EST
I20070209-1006

package xy;
public class Try {
	protected class Inner { }
	Inner[] i;
}

ITypeBinding#getJavaElement() on the type of i returns an non-existing IType with handleIdentifier "=zz1.5/src<xy{Try.java[Inner".

Expected: IType with handleIdentifier "=zz1.5/src<xy{Try.java[Try[Inner"
Comment 1 Olivier Thomann CLA 2007-02-12 09:44:58 EST
Released for 3.3M6.
Markus, could you please double-check?
Comment 2 Markus Keller CLA 2007-02-13 08:37:06 EST
Hmm, almost. It works for Inner[], but not for Inner[][].

When I change line 569 of TypeBinding from
	declaringTypeBinding = this.getComponentType().getDeclaringClass();
to
	declaringTypeBinding = this.getElementType().getDeclaringClass();
, then it works.
Comment 3 Olivier Thomann CLA 2007-02-13 08:44:29 EST
Released for 3.3M6.
Stupid me. This is what I wanted to do.
Comment 4 David Audel CLA 2007-03-21 06:24:08 EDT
Verified for 3.3 M6 using build I20070321-0010

Regression tests for this bug are
  ASTConverter15Test#test0244() -> test0246()