summary refs log tree commit diff stats
path: root/tests/async/ttemplateinasync.nim
blob: f4a2da538ba375e101423f6aec3f843b6cc04313 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
discard """
  output: 42
"""

import asyncdispatch

proc foo(): Future[int] {.async.} =
  template ret() = return 42
  ret()

echo (waitFor foo())