diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2018-11-28 02:46:22 -0500 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-11-28 08:46:22 +0100 |
commit | ab38c075f8864a8ddc129e3a4490f11f48d79d38 (patch) | |
tree | 8576fdd7ac2420976f7a056a759787d6dcc5343f /lib/system.nim | |
parent | 8ff18c0fb9b4aeb04209f7c7869b28fceb934f5c (diff) | |
download | Nim-ab38c075f8864a8ddc129e3a4490f11f48d79d38.tar.gz |
add: proc deepCopy*[T](y: T): T (#9740)
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim index 4414c2107..9111ddd86 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -4209,6 +4209,10 @@ when hasAlloc and not defined(nimscript) and not defined(JS) and ## for the implementation of ``spawn``. discard + proc deepCopy*[T](y: T): T = + ## Convenience wrapper around `deepCopy` overload. + deepCopy(result, y) + include "system/deepcopy" proc procCall*(x: untyped) {.magic: "ProcCall", compileTime.} = |