Bug 75395 - [dom] ClassInstanceCreation with unresolved parameter has no binding
Summary: [dom] ClassInstanceCreation with unresolved parameter has no binding
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-30 11:41 EDT by Markus Keller CLA
Modified: 2008-08-07 21:02 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 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.