Commit 80d79c97 authored by Stefan Behnel's avatar Stefan Behnel

add test case for a C compiler warning due to a bad extension type cast on final method calls

parent d984571b
# mode: run
# tag: exttype, final
cimport cython
cdef class BaseClass:
"""
>>> obj = BaseClass()
>>> obj.call_base()
True
"""
cdef method(self):
return True
def call_base(self):
return self.method()
@cython.final
cdef class Child(BaseClass):
"""
>>> obj = Child()
>>> obj.call_base()
True
>>> obj.call_child()
True
"""
cdef method(self):
return True
def call_child(self):
# original bug: this requires a proper cast for self
return self.method()
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