Message11291

Author jamesmudd
Recipients jamesmudd
Date 2017-04-02.18:03:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491156225.96.0.231354664116.issue2575@psf.upfronthosting.co.za>
In-reply-to
Content
If you import the attached Java class "Overloaded" which defines overloaded "test" and "testVarargs" methods for both int and boolean. When the methods are called in Jython the int versions are always called even when given a boolean argument e.g.

Jython 2.7.1rc1 (, Apr 2 2017, 17:16:05) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_121
Type "help", "copyright", "credits" or "license" for more information.
>>> import Overloaded
>>> o = Overloaded()
>>> o.test(True)
u'int:1'
>>> o.test(False)
u'int:0'
>>> o.test(11)
u'int:11'
>>> o.testVarargs(11, 12, 13)
u'ints...:[11, 12, 13]'
>>> o.testVarargs(True, True)
u'ints...:[1, 1]'
>>> o.testVarargs(True, True, False)
u'ints...:[1, 1, 0]'

There is a test around this area test_joverload but it doesn't seem to cover these cases.

This seems like quite a bad bug wondering if this is in fact expected?
History
Date User Action Args
2017-04-02 18:03:45jamesmuddsetrecipients: + jamesmudd
2017-04-02 18:03:45jamesmuddsetmessageid: <1491156225.96.0.231354664116.issue2575@psf.upfronthosting.co.za>
2017-04-02 18:03:45jamesmuddlinkissue2575 messages
2017-04-02 18:03:45jamesmuddcreate