Bug 73973 - Code assist fails in iteration when casting element to array
Summary: Code assist fails in iteration when casting element to array
Status: RESOLVED DUPLICATE of bug 72352
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-15 06:40 EDT by Sven Schliesing CLA
Modified: 2004-09-15 07:29 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Schliesing CLA 2004-09-15 06:40:44 EDT
With eclipse 3.1M1 and sun-jdk 1.5.0_rc1 (also tested with 1.4.2_04) code assist
fails when casting the element in an interation to an array.

works:
------------------
List list = new ArrayList();
Map map = new TreeMap();
	    
for (Iterator iter = list.iterator(); iter.hasNext();) {
  Object element = (Object) iter.next();
  map. <<-- code-assist works here
}
------------------

fails
------------------
List list = new ArrayList();
Map map = new TreeMap();
	    
for (Iterator iter = list.iterator(); iter.hasNext();) {
  Object element[] = (Object[]) iter.next();
  map. <<-- code-assist fails here "No completions available"
}
------------------

It is no difference what kind of array-cast (tested with Integer[] and Float[],
too) i use or where I put the [] ("Object[] element" gives the same failure as
"Object element[]")
Comment 1 Maik Schreiber CLA 2004-09-15 06:50:04 EDT
The interesting thing is that code assist works right _before_ the offending
cast, but not right _after_ it.
Comment 2 David Audel CLA 2004-09-15 07:29:32 EDT

*** This bug has been marked as a duplicate of 72352 ***