Commit dccf841d authored by da-woods's avatar da-woods Committed by GitHub

Fix argument name usage in finally blocks (GH-3713)

Fixes #3712 (hopefully) by reverting a small part of bbef4d74
parent 83ea5a4b
...@@ -1220,6 +1220,7 @@ class ControlFlowAnalysis(CythonTransform): ...@@ -1220,6 +1220,7 @@ class ControlFlowAnalysis(CythonTransform):
if self.flow.loops: if self.flow.loops:
self.flow.loops[-1].exceptions.append(descr) self.flow.loops[-1].exceptions.append(descr)
self.flow.block = body_block self.flow.block = body_block
body_block.add_child(entry_point)
self.flow.nextblock() self.flow.nextblock()
self._visit(node.body) self._visit(node.body)
self.flow.exceptions.pop() self.flow.exceptions.pop()
......
...@@ -18,4 +18,11 @@ def f(a, b, c, x): ...@@ -18,4 +18,11 @@ def f(a, b, c, x):
finally: finally:
i = 42 i = 42
def use_name_in_finally(name):
# GH3712
try:
[]
finally:
name()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment