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
|
|
@ -1467,10 +1467,14 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
|
|||
|
||||
of tyGenericInvocation:
|
||||
var x = a.skipGenericAlias
|
||||
var preventHack = false
|
||||
if x.kind == tyOwned and f.sons[0].kind != tyOwned:
|
||||
preventHack = true
|
||||
x = x.lastSon
|
||||
# XXX: This is very hacky. It should be moved back into liftTypeParam
|
||||
if x.kind in {tyGenericInst, tyArray} and
|
||||
c.calleeSym != nil and
|
||||
c.calleeSym.kind in {skProc, skFunc} and c.call != nil:
|
||||
c.calleeSym.kind in {skProc, skFunc} and c.call != nil and not preventHack:
|
||||
let inst = prepareMetatypeForSigmatch(c.c, c.bindings, c.call.info, f)
|
||||
#echo "inferred ", typeToString(inst), " for ", f
|
||||
return typeRel(c, inst, a)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue