Bug 75395

Summary: [dom] ClassInstanceCreation with unresolved parameter has no binding
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3 CC: Olivier_Thomann
Version: 3.0   
Target Milestone: 3.4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2004-09-30 11:41:11 EDT
I200409281200

public class A {
	A(Integer i) { }
	A takeInt(Integer i) { return new A(i); }
	void foo(){
		A a1= new A(varConstructor); // no binding
		A a2= takeInt(varMethod);    // has binding
	}
}

The ClassInstanceCreation 'new A(varConstructor)' has no binding, but the method
invocation takeInt(..) has one. Would be nice if a constructor with invalid
arguments could still guess a binding in this situation.

The missing binding makes quick fixes 'Create local variable / field / parameter
/ constant' fail to infer the correct type for the variable varConstructor.
Comment 1 Philipe Mulet CLA 2005-04-07 09:26:16 EDT
Deferring post 3.1
Comment 2 Olivier Thomann CLA 2008-08-07 21:01:43 EDT
Reopen to close as WORKSFORME since this is working in 3.4.
Comment 3 Olivier Thomann CLA 2008-08-07 21:02:18 EDT
Closing as WORKSFORME.