Bug 92451

Summary: code assist failure: new+cast+arrays
Product: [Eclipse Project] JDT Reporter: John Wiegand <John_Wiegand>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jared_burns, mazz, pkrupets, wassim.melhem
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description John Wiegand CLA 2005-04-22 16:36:37 EDT
I20050419
J2SE 5 (but also fails in JDK 1.4)

Code assist fails in the following (self-contained) class (see comments for 
line of error)

public class Test {
	public static void main(String[] args) {
		java.util.List elements = null;
		// code assist works on this line
		new Test(Test.toStrings((Test[])elements.toArray(new Test
[0])));
		//code assist fails on this line
	}
	public Test(Object object) {
	}
	public static Object toStrings(Test[] objects) {
		return null;
	}
}
Comment 1 David Audel CLA 2005-04-25 11:08:26 EDT
Fixed and test added
  CompletionParserTests2#test0151()

The problem is inside CompletionParser#consumeInsideCastExpression().
Comment 2 David Audel CLA 2005-04-29 07:21:45 EDT
*** Bug 82056 has been marked as a duplicate of this bug. ***
Comment 3 David Audel CLA 2005-04-29 07:55:33 EDT
*** Bug 87876 has been marked as a duplicate of this bug. ***
Comment 4 David Audel CLA 2005-04-29 09:33:25 EDT
*** Bug 87681 has been marked as a duplicate of this bug. ***
Comment 5 Olivier Thomann CLA 2005-05-12 14:19:36 EDT
Verified in I20050510-0010 + JDT/Core v_556