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

@ -14,7 +14,7 @@ joinable: false pending https://github.com/nim-lang/Nim/issues/9754
import marshal
template testit(x) = discard $$to[type(x)]($$x)
template testit(x) = discard $$to[typeof(x)]($$x)
var x: array[0..4, array[0..4, string]] = [
["test", "1", "2", "3", "4"], ["test", "1", "2", "3", "4"],
@ -89,8 +89,8 @@ var instance1 = Person(name: "Cletus", age: 12,
bio: "Я Cletus",
blob: "ABC\x80")
echo($$instance1)
echo(to[Person]($$instance1).bio == instance1.bio)
echo(to[Person]($$instance1).blob == instance1.blob)
echo(to[Person]($$instance1).bio == instance1.bio) # true
echo(to[Person]($$instance1).blob == instance1.blob) # true
# bug 5757