Commit 9a567494 authored by Stefan Behnel's avatar Stefan Behnel

warn about ignored freelist() decorator on subtypes

parent f2a4b09b
......@@ -4189,6 +4189,9 @@ class CClassDefNode(ClassDefNode):
% base_class_entry.type.name)
else:
self.base_type = base_class_entry.type
if env.directives.get('freelist', 0) > 0:
warning(self.pos, "freelists are not currently supported for subtypes", 1)
has_body = self.body is not None
if self.module_name and self.visibility != 'extern':
module_path = self.module_name.split(".")
......
# mode: error
# tag: freelist, werror
cimport cython
@cython.freelist(8)
cdef class ExtType:
pass
@cython.freelist(8)
cdef class ExtTypeObject(object):
pass
cdef class ExtSubTypeOk(ExtType):
pass
@cython.freelist(8)
cdef class ExtSubTypeFail(ExtType):
pass
_ERRORS = """
18:5: freelists are not currently supported for subtypes
"""
# mode: run
# tag: freelist
cimport cython
......
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