Here is the await declaration line 128:
>
> template await*[T](f: Future[T]): auto {.used.} =
> var internalTmpFuture: FutureBase = f
> yield internalTmpFuture
> (cast[typeof(f)](internalTmpFuture)).read()
>
>
> Run
I suspect that there is an ambiguity with generic type T, but what's strange is
that prefixing the await macro with the module name (`asyncdispatch.await`)
makes it work. Another way to work around tis issue is by not importing await
but instead:
from asyncdispatch import Future, async, newFuture, complete
template await[T](f: Future[T]): auto {.used.} = asyncdispatch.await(f)
Run
There is an issue that made me understand a bit what could happen:
<https://github.com/nim-lang/Nim/issues/18861>