History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-999
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Cedric Vivier
Reporter: Cedric Vivier
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

Overload resolution inconsistency on duck vs. non-duck

Created: 16/Apr/08 02:04 PM   Updated: 17/Apr/08 04:10 AM
Component/s: None
Affects Version/s: 0.8.1
Fix Version/s: 0.8.2

Time Tracking:
Not Specified

Issue Links:
Related
 

Testcase included: yes


 Description  « Hide
class A:
        pass
class B(A):
        pass
class C(B):
        pass

class Test:
    def foo(x as A):
        print "foo-A"

    def foo(x as B):
        print "foo-B"

c = C()

duck_test as duck = Test()
duck_test.foo(c) #prints foo-A

test = Test()
test.foo(c) #prints foo-B

spotted by Greg (hangar).



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Cedric Vivier - 17/Apr/08 04:10 AM
fixed in r.2927