allow old styled RTTI for arc/orc (#15331)

This commit is contained in:
Andreas Rumpf 2020-09-16 14:57:01 +02:00 • committed by GitHub
commit fd31e8ff6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 512 additions and 303 deletions

View file

@ -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"],