summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-11-28 02:46:22 -0500
committerAndreas Rumpf <rumpf_a@web.de>2018-11-28 08:46:22 +0100
commitab38c075f8864a8ddc129e3a4490f11f48d79d38 (patch)
tree8576fdd7ac2420976f7a056a759787d6dcc5343f /lib/system.nim
parent8ff18c0fb9b4aeb04209f7c7869b28fceb934f5c (diff)
downloadNim-ab38c075f8864a8ddc129e3a4490f11f48d79d38.tar.gz
add: proc deepCopy*[T](y: T): T (#9740)
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim4
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.} =