mirror of https://github.com/m-labs/artiq.git
transforms/remove_inter_assigns: fix bug with array assignment
This commit is contained in:
parent
1e8c9837ac
commit
1c0c0b691e
|
@ -36,10 +36,11 @@ class _InterAssignRemover(ast.NodeTransformer):
|
||||||
self.replacements[target.id] = node.value
|
self.replacements[target.id] = node.value
|
||||||
else:
|
else:
|
||||||
for target in node.targets:
|
for target in node.targets:
|
||||||
try:
|
if isinstance(target, ast.Name):
|
||||||
del self.replacements[target.id]
|
try:
|
||||||
except KeyError:
|
del self.replacements[target.id]
|
||||||
pass
|
except KeyError:
|
||||||
|
pass
|
||||||
return node
|
return node
|
||||||
|
|
||||||
def visit_AugAssign(self, node):
|
def visit_AugAssign(self, node):
|
||||||
|
|
Loading…
Reference in New Issue