diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2015-08-04 09:06:47 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2015-08-04 09:06:47 +0100 |
commit | f8f967720598ad75ec0e0db68a983cbcdd39145d (patch) | |
tree | e542cfcc9d0e0c90702f96c7b7b566f67252fadc | |
parent | 202cc489034f6e4f41140d7af82e93b112fcd3dd (diff) | |
download | Nim-f8f967720598ad75ec0e0db68a983cbcdd39145d.tar.gz |
Updated documentation of system.new. Ref #2699.
-rw-r--r-- | lib/system.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim index 383002fcf..93d76e78b 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: |