summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-08-07 19:40:58 +0200
committerAraq <rumpf_a@web.de>2015-08-07 19:40:58 +0200
commit94e504113edfb93ac4eaf59cc78213323fa8a4c0 (patch)
tree2543159aaafe2af70eb83033ec9d063619b335ff
parentb2516258407216a9f6fbf3c6b3e9cf72e12e44d3 (diff)
downloadNim-94e504113edfb93ac4eaf59cc78213323fa8a4c0.tar.gz
fixes #3193
-rw-r--r--lib/system.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 8cae7c5db..78769208c 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -188,7 +188,7 @@ proc new*(T: typedesc): auto =
   ## 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``. 
+  ## otherwise it will be ``ref T``.
   when (T is ref):
       var r: T
   else:
@@ -572,6 +572,7 @@ proc unsafeNew*[T](a: var ref T, size: Natural) {.magic: "New", noSideEffect.}
   ## purposes when you know what you're doing!
 
 proc sizeof*[T](x: T): int {.magic: "SizeOf", noSideEffect.}
+proc sizeof*(x: typedesc): int {.magic: "SizeOf", noSideEffect.}
   ## returns the size of ``x`` in bytes. Since this is a low-level proc,
   ## its usage is discouraged - using ``new`` for the most cases suffices
   ## that one never needs to know ``x``'s size. As a special semantic rule,