File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -161,3 +161,13 @@ def __init__(self):
161
161
except ZeroDivisionError as ex :
162
162
assert type (ex .__cause__ ) == NameError
163
163
assert ex .__context__ == None
164
+
165
+ try :
166
+ try :
167
+ raise ZeroDivisionError
168
+ except ZeroDivisionError as ex :
169
+ pass
170
+ finally :
171
+ raise NameError
172
+ except NameError as ex2 :
173
+ assert ex2 .__context__ == None
Original file line number Diff line number Diff line change @@ -637,6 +637,8 @@ impl Compiler {
637
637
in_exc : true ,
638
638
} ) ;
639
639
640
+ self . in_exc_handler = was_in_exc_handler;
641
+
640
642
// We successfully ran the try block:
641
643
// else:
642
644
self . set_label ( else_label) ;
@@ -649,7 +651,6 @@ impl Compiler {
649
651
if let Some ( statements) = finalbody {
650
652
self . compile_statements ( statements) ?;
651
653
}
652
- self . in_exc_handler = was_in_exc_handler;
653
654
// unimplemented!();
654
655
Ok ( ( ) )
655
656
}
You can’t perform that action at this time.
0 commit comments