Varargs-based ambiguity does not pick most specific method
----------------------------------------------------------

                 Key: JRUBY-5992
                 URL: https://jira.codehaus.org/browse/JRUBY-5992
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.6.3
            Reporter: Charles Oliver Nutter
            Priority: Minor


If you have two Java methods (or constructors) like this:

{noformat}
public static void foo(Object... objs) {}
public static void foo(String str, Object... objs) {}
{noformat}

A Ruby call like foo('bar') will call the first signature, when it should call 
the second (since the second is a better match in the first arg).

There are specs in spec/java_integration/methods/dispatch_spec.rb with pending 
sections for the broken logic.

Fixing this will require we start to Java Language Specification-like 
comparison of argument types to find the most specific match.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to