Skip to content

Commit

Permalink
undo #258 pending alternatives
Browse files Browse the repository at this point in the history
This reverts commit e1f829e.
  • Loading branch information
disruptek committed May 18, 2022
1 parent 2f98a20 commit 717095f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cps/transform.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1095,8 +1095,12 @@ macro cpsHandleUnhandledException(contType: typed; n: typed): untyped =
body
except:
cont.ex = getCurrentException()
return Continuation: unwind(contType(cont), cont.ex)

# A continuation body created with makeContProc (which is all of
# them) will have a terminator in the body, thus this part can
# only be reached iff the except branch happened to deter the jump
#
# Workaround for https://github.com/nim-lang/Nim/issues/18411
return Continuation: unwind(contType(cont), cont.ex)
result = fnDef

debugAnnotation cpsHandleUnhandledException, n:
Expand Down

0 comments on commit 717095f

Please sign in to comment.