add: proc deepCopy*[T](y: T): T (#9740)

This commit is contained in:
Timothee Cour 2018-11-28 02:46:22 -05:00 • committed by Andreas Rumpf
commit ab38c075f8

View file

@ -4209,6 +4209,10 @@ when hasAlloc and not defined(nimscript) and not defined(JS) and
## for the implementation of ``spawn``. ## for the implementation of ``spawn``.
discard discard
proc deepCopy*[T](y: T): T =
## Convenience wrapper around `deepCopy` overload.
deepCopy(result, y)
include "system/deepcopy" include "system/deepcopy"
proc procCall*(x: untyped) {.magic: "ProcCall", compileTime.} = proc procCall*(x: untyped) {.magic: "ProcCall", compileTime.} =