From 7213969901a4232013a6e6732d7b434970922510 Mon Sep 17 00:00:00 2001 From: cooldome Date: Fri, 6 Dec 2019 08:56:54 +0000 Subject: fixes #12821 (#12822) --- tests/destructor/tcaseobj_transitions.nim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/destructor') 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 -- cgit 1.4.1-2-gfad0