diff options
author | cooldome <cdome@bk.ru> | 2019-12-06 08:56:54 +0000 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-12-06 09:56:54 +0100 |
commit | 7213969901a4232013a6e6732d7b434970922510 (patch) | |
tree | bfc275eba678c10040345b43fbed38197d1db144 /tests/destructor/tcaseobj_transitions.nim | |
parent | 1db21721ec816e01ef91633941e0295f7724e1f7 (diff) | |
download | Nim-7213969901a4232013a6e6732d7b434970922510.tar.gz |
fixes #12821 (#12822)
Diffstat (limited to 'tests/destructor/tcaseobj_transitions.nim')
-rw-r--r-- | tests/destructor/tcaseobj_transitions.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/destructor/tcaseobj_transitions.nim b/tests/destructor/tcaseobj_transitions.nim index 9377d57b0..4e203f4ef 100644 --- a/tests/destructor/tcaseobj_transitions.nim +++ b/tests/destructor/tcaseobj_transitions.nim @@ -31,3 +31,19 @@ var y = MyCaseObjectB(kind: A) y.x = 1 y.kind = C echo "no crash" + + +################# +## bug #12821 + +type + RefBaseObject* = ref object of RootObj + case kind: bool + of true: a: int + of false: b: float + + MyRefObject = ref object of RefBaseObject + x: float + +let z = new(MyRefObject) +z.kind = false |