diff options
author | Zahary Karadjov <zahary@gmail.com> | 2017-04-07 16:58:17 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2017-04-07 17:03:49 +0300 |
commit | eb635d9ccf4abb9a003808ed1ddce889ecd982ef (patch) | |
tree | ba94a7dd784cda2d7b481b1841000b66c572fe92 /tests | |
parent | ee4b98ec17ba7221f864a40ba5d25f63821987cb (diff) | |
download | Nim-eb635d9ccf4abb9a003808ed1ddce889ecd982ef.tar.gz |
fix #5648
Diffstat (limited to 'tests')
-rw-r--r-- | tests/types/t5648.nim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/types/t5648.nim b/tests/types/t5648.nim new file mode 100644 index 000000000..c230cc12c --- /dev/null +++ b/tests/types/t5648.nim @@ -0,0 +1,21 @@ +discard """ +output: "ptr Foo" +""" + +import typetraits + +type Foo = object + bar*: int + +proc main() = + var f = create(Foo) + f.bar = 3 + echo f.type.name + + discard realloc(f, 0) + + var g = Foo() + g.bar = 3 + +main() + |