Commit 3b931f10 authored by mattip's avatar mattip

whoops, staticmethod is a valid cdef decorator

parent bee7b699
......@@ -2344,11 +2344,10 @@ class CFuncDefNode(FuncDefNode):
for decorator in self.decorators:
func = decorator.decorator
if func.is_name:
if func.name == 'classmethod' or func.name == 'staticmethod':
error(self.pos, "Cannot handle these decorators yet")
if func.name == 'property':
# XXX DO SOMETHING HERE???
if func.name in ('property', 'staticmethod'):
pass
else:
error(self.pos, "Cannot handle %s decorators yet" % func.name)
self.is_c_class_method = env.is_c_class_scope
if self.directive_locals is None:
......
......@@ -2256,6 +2256,7 @@ class ReplacePropertyNode(CythonTransform):
# done - remove the decorator node
node.decorators.remove(decorator_node)
return [node]
return [node]
class FindInvalidUseOfFusedTypes(CythonTransform):
......
......@@ -150,7 +150,7 @@ def sum(Foo f):
cdef extern from "foo.h":
ctypedef class foo_extension.Foo [object FooStructOpaque]:
@staticmethod
@classmethod
cdef void field0():
print('in staticmethod of Foo')
......
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