forked from M-Labs/artiq
LocalAccessValidator: fix validation of closures with no outer variables.
This commit is contained in:
parent
6f11fa6bb1
commit
e299801c0f
|
@ -99,6 +99,8 @@ class LocalAccessValidator:
|
||||||
|
|
||||||
if isinstance(insn, ir.Closure):
|
if isinstance(insn, ir.Closure):
|
||||||
env = insn.environment()
|
env = insn.environment()
|
||||||
|
# Make sure this environment has any interesting variables.
|
||||||
|
if env in block_state:
|
||||||
for var_name in block_state[env]:
|
for var_name in block_state[env]:
|
||||||
if not block_state[env][var_name]:
|
if not block_state[env][var_name]:
|
||||||
# A closure would capture this variable while it is not always
|
# A closure would capture this variable while it is not always
|
||||||
|
|
Loading…
Reference in New Issue