Make await a template (#12085)

* Make await a template
* Generate await inside async/multisync
This commit is contained in:
Alexander Ivanov 2020-04-25 21:27:03 +03:00 • committed by GitHub
commit 56584414f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 134 deletions

View file

@ -0,0 +1,15 @@
discard """
errormsg: "undeclared identifier: 'await'"
cmd: "nim c $file"
file: "tasync_noasync.nim"
"""
import async
proc a {.async.} =
discard
await a()
# if we overload a fallback handler to get
# await only available within {.async.}
# we would need `{.dirty.}` templates for await