From 97ce1d6c2d2be21f61427606fa3e93e41a54b600 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 29 Oct 2014 16:03:20 +0800 Subject: [PATCH] transforms/inline: fix assign context on attributes --- artiq/transforms/inline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/transforms/inline.py b/artiq/transforms/inline.py index 1e1d3d4c3..f69c4506f 100644 --- a/artiq/transforms/inline.py +++ b/artiq/transforms/inline.py @@ -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)