Fix infinite recursion when await is in except body.

This commit is contained in:
Dominik Picheta 2015-03-30 00:42:21 +01:00
commit 3751019823
3 changed files with 31 additions and 3 deletions

View file

@ -0,0 +1,16 @@
discard """
file: "tasynctry2.nim"
errormsg: "\'yield\' cannot be used within \'try\' in a non-inlined iterator"
line: 15
"""
import asyncdispatch
proc foo(): Future[bool] {.async.} = discard
proc test5(): Future[int] {.async.} =
try:
discard await foo()
raise newException(ValueError, "Test5")
except:
discard await foo()
result = 0