newruntime for async (#11650)
* fixes overloading resolution for passing owned(Future[string]) to Future[T] * WIP: make --newruntime work with .async * memtracker: make it compile again * make Nimble compile again
This commit is contained in:
parent
d914dca513
commit
5f515410af
12 changed files with 60 additions and 47 deletions
|
|
@ -220,8 +220,11 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} =
|
|||
|
||||
let prcName = prc.name.getName
|
||||
|
||||
let returnType = prc.params[0]
|
||||
var returnType = prc.params[0]
|
||||
var baseType: NimNode
|
||||
if returnType.kind in nnkCallKinds and returnType[0].eqIdent("owned") and
|
||||
returnType.len == 2:
|
||||
returnType = returnType[1]
|
||||
# Verify that the return type is a Future[T]
|
||||
if returnType.kind == nnkBracketExpr:
|
||||
let fut = repr(returnType[0])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue