summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-09-16 14:57:01 +0200
committerGitHub <noreply@github.com>2020-09-16 14:57:01 +0200
commitfd31e8ff6f96527cc52125d01311d022ff82fead (patch)
treeda6f772f157a34fc80316a6ba4888f8cbd730971 /lib/pure
parent0aaf4e2dfa2d06a71202bd283e99bb017c781f2c (diff)
downloadNim-fd31e8ff6f96527cc52125d01311d022ff82fead.tar.gz
allow old styled RTTI for arc/orc (#15331)
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/marshal.nim11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/pure/marshal.nim b/lib/pure/marshal.nim
index b6ad2e20f..e74e68b05 100644
--- a/lib/pure/marshal.nim
+++ b/lib/pure/marshal.nim
@@ -51,16 +51,15 @@
 ## * `json module <json.html>`_
 
 const unsupportedPlatform =
-  when defined(nimV2): "new runtime"
-  elif defined(js): "javascript"
+  when defined(js): "javascript"
   elif defined(nimscript): "nimscript"
   else: ""
 
 when unsupportedPlatform != "":
   {.error: "marshal module is not supported in " & unsupportedPlatform & """.
-Please use alternative packages for serialization. 
-It is possible to reimplement this module using generics and type traits. 
-Please contribute new implementation.""".}
+Please use alternative packages for serialization.
+It is possible to reimplement this module using generics and type traits.
+Please contribute a new implementation.""".}
 
 import streams, typeinfo, json, intsets, tables, unicode
 
@@ -345,7 +344,7 @@ proc to*[T](data: string): T =
 
 
 when not defined(testing) and isMainModule:
-  template testit(x: untyped) = echo($$to[type(x)]($$x))
+  template testit(x: untyped) = echo($$to[typeof(x)]($$x))
 
   var x: array[0..4, array[0..4, string]] = [
     ["test", "1", "2", "3", "4"], ["test", "1", "2", "3", "4"],