koch.nim compiles with --newruntime

This commit is contained in:
Araq 2019-04-09 21:25:23 +02:00
commit 72408842d9
2 changed files with 9 additions and 5 deletions

View file

@ -707,9 +707,9 @@ proc track(tracked: PEffects, n: PNode) =
let op = a.typ
if getConstExpr(tracked.ownerModule, n, tracked.graph) != nil:
return
if op != nil:
if n.typ != nil:
if tracked.owner.kind != skMacro:
createTypeBoundOps(tracked.c, op, n.info)
createTypeBoundOps(tracked.c, n.typ, n.info)
if a.kind == nkCast and a[1].typ.kind == tyProc:
a = a[1]
# XXX: in rare situations, templates and macros will reach here after