2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

transforms/inline: fix assign context on attributes

This commit is contained in:
Sebastien Bourdeauducq 2014-10-29 16:03:20 +08:00
parent c02589a230
commit 97ce1d6c2d

View File

@ -227,7 +227,7 @@ class _ReferenceReplacer(ast.NodeVisitor):
if isinstance(ival, ast.AST):
return ival
elif isinstance(ival, _UserVariable):
return ast.copy_location(ast.Name(ival.name, ast.Load()), node)
return ast.copy_location(ast.Name(ival.name, node.ctx), node)
else:
return value_to_ast(ival)