Summary: | incorrect compile error message | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Adam Kiezun <akiezun> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | philippe_mulet |
Version: | 2.0 | ||
Target Milestone: | 2.1 M3 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Adam Kiezun
2002-10-14 09:50:54 EDT
This is a bug in the shortReadableName() method. Proposal: 1) remove shortReadableName() on org.eclipse.jdt.internal.compiler.lookup.TypeBinding 2) Add: public char[] shortReadableName(){ char[] brackets = new char[dimensions * 2]; for (int i = dimensions * 2 - 1; i >= 0; i -= 2) { brackets[i] = ']'; brackets[i - 1] = '['; } return CharOperation.concat(leafComponentType.shortReadableName(), brackets); } on org.eclipse.jdt.internal.compiler.lookup.ArrayBinding 3) Add: public char[] shortReadableName(){ return simpleName; } on org.eclipse.jdt.internal.compiler.lookup.BaseTypeBinding. The bug was simply that the method on TypeBinding was incorrectly calling sourceName() and therefore the problemReferenceBinding method was never called. It called sourceName() for the problemReferenceBinding instead which returns null. Philippe - Could you please verify the proposal? Fixed and released in 2.1 stream. Verified. |