From f8f967720598ad75ec0e0db68a983cbcdd39145d Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Tue, 4 Aug 2015 09:06:47 +0100 Subject: [PATCH] Updated documentation of system.new. Ref #2699. --- lib/system.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/system.nim b/lib/system.nim index 383002fcfc..93d76e78b8 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -178,7 +178,10 @@ proc new*[T](a: var ref T) {.magic: "New", noSideEffect.} proc new*(T: typedesc): auto = ## creates a new object of type ``T`` and returns a safe (traced) - ## reference to it as result value + ## reference to it as result value. + ## + ## When ``T`` is a ref type then the resulting type will be ``T``, + ## otherwise it will be ``ref T``. when (T is ref): var r: T else: