Files
Nim/tests/async/t11558.nim
Jake Leahy da3274d1b3 Implicit return working for async proc (#20933)
* Implicit return working for asyncdispatch proc

Closes #11558

* Test case

* Test that return value is actually used

* Update tests/async/t11558.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-12-09 18:10:33 +01:00

14 lines
199 B
Nim

discard """
output: "Hello\n9"
"""
import std/asyncdispatch
proc foo(): Future[string] {.async.} =
"Hello"
proc bar(): Future[int] {.async.} =
result = 9
echo waitFor foo()
echo waitFor bar()