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

visit children nodes, fix regression

parent 7ef9c72f
......@@ -1789,10 +1789,8 @@ class AnalyseExpressionsTransform(CythonTransform):
return node
def visit_AttributeNode(self, node):
# Note: Expression analysis for attributes has already happened
# at this point (by recursive calls starting from FuncDefNode)
#print node.dump()
#return node
self.visitchildren(node)
type = node.obj.type
if type.is_extension_type and type.objstruct_cname == 'PyArrayObject':
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