Make await a template (#12085)
* Make await a template * Generate await inside async/multisync
This commit is contained in:
parent
caf30e7cb5
commit
56584414f3
5 changed files with 69 additions and 134 deletions
11
tests/async/tasync_nofuture.nim
Normal file
11
tests/async/tasync_nofuture.nim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
discard """
|
||||
errormsg: "await expects Future[T], got int"
|
||||
cmd: "nim c $file"
|
||||
file: "asyncmacro.nim"
|
||||
"""
|
||||
import async
|
||||
|
||||
proc a {.async.} =
|
||||
await 0
|
||||
|
||||
waitFor a()
|
||||
Loading…
Add table
Add a link
Reference in a new issue