When isFoo and getFoo collide, isFoo wins when calling foo
----------------------------------------------------------

                 Key: JRUBY-3273
                 URL: http://jira.codehaus.org/browse/JRUBY-3273
             Project: JRuby
          Issue Type: Bug
            Reporter: Logan Barnett
            Assignee: Thomas E Enebo
             Fix For: JRuby 1.1.7


This is a pretty strange case with JList, which has the following
boolean isSelectedIndex(int index)
int getSelectedIndex()

jlist.selected_index raises an argument error (it is trying to call 
isSelectedIndex). At the least, I think the get version should win in a name 
collision like this. However, in this odd case JRuby _could_ direct the call 
based on args, and just treat selected_index like an overloaded method. That 
seems pretty tricky though. Thoughts?

At one point, I believe selected_index would default to get instead of is (this 
is a new bug from old code).

For now, I'm using selected_index__method. Where did the __method stuff come 
from?

-- 
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