diff options
author | Damien George <damien.p.george@gmail.com> | 2018-10-26 16:36:29 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-10-27 23:57:14 +1100 |
commit | c2074e7b66a042492604fbf9ea80b71cdf848e93 (patch) | |
tree | 6ece2379e19cae9c9e2e57bc00585cb2ec3e78aa /tests | |
parent | 746dbf78d3067f32c8885217d53ff9231dac3772 (diff) |
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).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cmdline/cmd_showbc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/cmdline/cmd_showbc.py b/tests/cmdline/cmd_showbc.py index 6e99fc418..916228356 100644 --- a/tests/cmdline/cmd_showbc.py +++ b/tests/cmdline/cmd_showbc.py @@ -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 |