forked from M-Labs/artiq
1
0
Fork 0

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
1 changed files with 1 additions and 1 deletions

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)