Skip to content

Commit

Permalink
Fix bug: 'finally_' should assert no head
Browse files Browse the repository at this point in the history
  • Loading branch information
hsfzxjy committed Feb 7, 2021
1 parent 9091565 commit ee70df0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lambdex/compiler/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ def r_try(node: ast.Subscript, ctx: Context, clauses: list):
orelse_body.extend(_compile_stmts(ctx, clause.body))
elif clause.name == 'finally_':
ctx.assert_(not final_body, 'unexpected_ "finally_"', node)
ctx.assert_no_head(clause)
final_body.extend(_compile_stmts(ctx, clause.body))

ctx.assert_(
Expand Down

0 comments on commit ee70df0

Please sign in to comment.