diff options
Diffstat (limited to 'lib/pure/asyncmacro.nim')
-rw-r--r-- | lib/pure/asyncmacro.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/asyncmacro.nim b/lib/pure/asyncmacro.nim index afc28bbdf..77db80bc6 100644 --- a/lib/pure/asyncmacro.nim +++ b/lib/pure/asyncmacro.nim @@ -267,7 +267,7 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} = static: error "await expects Future[T], got " & $typeof(f) - template await[T](f: Future[T]): auto = + template await[T](f: Future[T]): auto {.used.} = var internalTmpFuture: FutureBase = f yield internalTmpFuture (cast[type(f)](internalTmpFuture)).read() @@ -355,4 +355,4 @@ macro multisync*(prc: untyped): untyped = # overload for await as a fallback handler, based on the yglukhov's patch to chronos: https://github.com/status-im/nim-chronos/pull/47 # template await*(f: typed): untyped = # static: - # error "await only available within {.async.}" \ No newline at end of file + # error "await only available within {.async.}" |