Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318632

Summary: select most significant method signature fails in special case
Product: z_Archived Reporter: Henrik Lindberg <henrik.lindberg>
Component: b3Assignee: Project Inbox <b3.engine-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Henrik Lindberg CLA 2010-07-01 12:08:01 EDT
The java.lang.ProcessBuilder has two methods with the following signature:
ProcessBuilder command(String...)
List<String> command()

In java, the command() is picked if no arguments are specified.
In B3, the command(String...) is picked.

The problem is in org.eclipse.b3.backend.evaluator.typesystem.TypeUtils.Candidate.findMostSpecificApplicableCandidates(String, Type[], CandidateSource<C>)

which does not continue the search after it finds command(String...).
I debugged this as far as finding that a return of VARIABLE_ARITY_BY_SUBTYPING is returned for this method.
Comment 1 Henrik Lindberg CLA 2010-07-01 12:09:24 EDT
As I continued debugging - I found that it actually did not get a candidate list of more than the command(String...) function - so the problem is introduced earlier... (looks like an issue with not loading all overloaded methods when loading one... (i.e. it knows about command(String...), but not command().
Comment 2 Henrik Lindberg CLA 2010-07-01 13:12:04 EDT
Found it. Now, all methods with the same name are loaded and woven at the same time.