Commit 0ea50f34 authored by Vitja Makarov's avatar Vitja Makarov

Don't try to create generator closure for c[p]def functions

parent 4575cc2c
......@@ -1885,7 +1885,7 @@ class MarkClosureVisitor(CythonTransform):
return node
def visit_CFuncDefNode(self, node):
self.visit_FuncDefNode(node)
self.visitchildren(node)
if node.needs_closure:
error(node.pos, "closures inside cdef functions not yet supported")
return node
......
# mode: error
cdef cdef_yield():
yield
cpdef cpdef_yield():
yield
_ERRORS = u"""
4:4: 'yield' not supported here
7:4: 'yield' not supported here
"""
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