allow old styled RTTI for arc/orc (#15331)
This commit is contained in:
parent
0aaf4e2dfa
commit
fd31e8ff6f
23 changed files with 512 additions and 303 deletions
|
|
@ -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"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue