Commit d1e91664 authored by Stefan Behnel's avatar Stefan Behnel

prevent auto_cpdef from breaking module-level lambdas

parent ccfad0a2
......@@ -2031,6 +2031,10 @@ class AlignFunctionDefinitions(CythonTransform):
# self.visitchildren(node)
return node
def visit_ExprNode(self, node):
# ignore lambdas and everything else that appears in expressions
return node
class RemoveUnreachableCode(CythonTransform):
def visit_Node(self, node):
......
......@@ -37,3 +37,11 @@ def starstararg_func(**kwargs):
1
"""
return kwargs['a']
l = lambda x: 1
def test_lambda():
"""
>>> l(1)
1
"""
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