Commit 4fb73c07 authored by Stefan Behnel's avatar Stefan Behnel

Merge branch '0.20.x'

parents a43800a9 6b5856ab
......@@ -2445,8 +2445,6 @@ class CFuncType(CType):
if self.nogil != other_type.nogil:
return 0
self.original_sig = other_type.original_sig or other_type
if as_cmethod:
self.args[0] = other_type.args[0]
return 1
......
# the calls:
from cython cimport typeof
def call2():
"""
......@@ -39,3 +39,31 @@ def test_foo():
print foo(1, 2)
print foo(1, 2, 3)
print foo(1, foo(2, 3), foo(4))
cdef class A:
cpdef method(self):
"""
>>> A().method()
'A'
"""
return typeof(self)
cdef class B(A):
cpdef method(self, int x = 0):
"""
>>> B().method()
('B', 0)
>>> B().method(100)
('B', 100)
"""
return typeof(self), x
cdef class C(B):
cpdef method(self, int x = 10):
"""
>>> C().method()
('C', 10)
>>> C().method(100)
('C', 100)
"""
return typeof(self), x
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment