summary refs log tree commit diff stats
path: root/tests/async/tasynctry2.nim
blob: f82b6cfe0dc95965b4a11cd3f776abc60dd268f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
discard """
  file: "tasynctry2.nim"
  errormsg: "\'yield\' cannot be used within \'try\' in a non-inlined iterator"
  line: 17
"""
import asyncdispatch

{.experimental: "oldIterTransf".}

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