diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 6970d09c3d..367fced9a6 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -663,6 +663,13 @@ proc closureSetup(p: BProc, prc: PSym) = linefmt(p, cpsStmts, "$1 = ($2) ClE_0;$n", rdLoc(env.loc), getTypeDesc(p.module, env.typ)) +proc containsResult(n: PNode): bool = + if n.kind == nkSym and n.sym.kind == skResult: + result = true + else: + for i in 0..