Commit 3dc1d68b authored by Vitja Makarov's avatar Vitja Makarov

visit children nodes, fix regression

parent 7ef9c72f
...@@ -1789,10 +1789,8 @@ class AnalyseExpressionsTransform(CythonTransform): ...@@ -1789,10 +1789,8 @@ class AnalyseExpressionsTransform(CythonTransform):
return node return node
def visit_AttributeNode(self, node): def visit_AttributeNode(self, node):
# Note: Expression analysis for attributes has already happened self.visitchildren(node)
# at this point (by recursive calls starting from FuncDefNode)
#print node.dump()
#return node
type = node.obj.type type = node.obj.type
if type.is_extension_type and type.objstruct_cname == 'PyArrayObject': if type.is_extension_type and type.objstruct_cname == 'PyArrayObject':
from NumpySupport import numpy_transform_attribute_node from NumpySupport import numpy_transform_attribute_node
......
# mode: run
# tags: lambda, attribute, regression
class TestClass(object):
bar = 123
def test_attribute_and_lambda(f):
"""
>>> test_attribute_and_lambda(lambda _: TestClass())
123
"""
return f(lambda x: x).bar
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