tests/cmdline/cmd_showbc.py: Fix test to explicitly declare nonlocal.
The way it was written previously the variable x was not an implicit nonlocal, it was just a normal local (but the compiler has a bug which incorrectly makes it a nonlocal).
This commit is contained in:
parent
746dbf78d3
commit
c2074e7b66
|
@ -108,7 +108,7 @@ def f():
|
|||
# closed over variables
|
||||
x = 1
|
||||
def closure():
|
||||
a = x + 1
|
||||
nonlocal x; a = x + 1
|
||||
x = 1
|
||||
del x
|
||||
|
||||
|
|
Loading…
Reference in New Issue