Community
Participate
Working Groups
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[]")
The interesting thing is that code assist works right _before_ the offending cast, but not right _after_ it.
*** This bug has been marked as a duplicate of 72352 ***