mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
* 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>
14 lines
199 B
Nim
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()
|