JI closure coercion feature is not mapping to proper method signature
---------------------------------------------------------------------

                 Key: JRUBY-3648
                 URL: http://jira.codehaus.org/browse/JRUBY-3648
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
            Reporter: Thomas E Enebo
            Assignee: Thomas E Enebo
            Priority: Blocker
             Fix For: JRuby 1.3


Implicit Closure Coercion feature does not find a proper match when it is a 
leading argument and there are multiple same-arity overloaded Java method 
candidates.  The code which I tripped over was:

{noformat}
    player_collision_event_handler = player.collision_event_handler
    on_floor = proc do |event|
      contact_info = event.trigger_data
      player_on_floor = true if contact_info.node1 == floor || 
contact_info.node2 == floor
    end
    input.add_action on_floor, player_collision_event_handler, false
{noformat}

  Where input.add_action has the following 3-arity methods:

{noformat}
void addAction(InputActionInterface inputAction, java.lang.String 
triggerCommand, boolean allowRepeats) 
void    addAction(InputAction action, SyntheticAxis eventHandler, boolean 
allowRepeats)
void    addAction(InputAction action, SyntheticButton eventHandler, boolean 
allowRepeats)
{noformat}

  The problem seems to be that having the first argument be a closure is 
screwing up our scoring system for matching the proper signature.  Note that 
argument 2 makes these three signatures still matchable so we should still do 
the right thing.

  I already have a spec which works...now to fix this thing.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
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