mirror of https://github.com/m-labs/artiq.git
transforms/inline: fix assign context on attributes
This commit is contained in:
parent
c02589a230
commit
97ce1d6c2d
|
@ -227,7 +227,7 @@ class _ReferenceReplacer(ast.NodeVisitor):
|
||||||
if isinstance(ival, ast.AST):
|
if isinstance(ival, ast.AST):
|
||||||
return ival
|
return ival
|
||||||
elif isinstance(ival, _UserVariable):
|
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:
|
else:
|
||||||
return value_to_ast(ival)
|
return value_to_ast(ival)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue