tyProc does not require copying in JS codegen

This commit is contained in:
Neelesh Chandola
2018-12-11 16:49:36 +05:30
parent 03c4231951
commit 685a5544c4

View File

@@ -945,7 +945,7 @@ proc needsNoCopy(p: PProc; y: PNode): bool =
else:
return (mapType(y.typ) != etyBaseIndex and
(skipTypes(y.typ, abstractInst).kind in
{tyRef, tyPtr, tyLent, tyVar, tyCString} + IntegralTypes))
{tyRef, tyPtr, tyLent, tyVar, tyCString, tyProc} + IntegralTypes))
return true
proc genAsgnAux(p: PProc, x, y: PNode, noCopyNeeded: bool) =