From a4d02f591c685b261a41a7b9b51aaba05c542499 Mon Sep 17 00:00:00 2001 From: cooldome Date: Mon, 16 Nov 2020 11:39:28 +0000 Subject: fix #15910 (#15984) * fix #15910 * produce op of op is nil * Trigger build --- compiler/liftdestructors.nim | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'compiler') diff --git a/compiler/liftdestructors.nim b/compiler/liftdestructors.nim index 943dd074e..45a66e795 100644 --- a/compiler/liftdestructors.nim +++ b/compiler/liftdestructors.nim @@ -42,6 +42,9 @@ proc at(a, i: PNode, elemType: PType): PNode = result[1] = i result.typ = elemType +proc destructorOverriden(t: PType): bool = + t.attachedOps[attachedDestructor] != nil and sfOverriden in t.attachedOps[attachedDestructor].flags + proc fillBodyTup(c: var TLiftCtx; t: PType; body, x, y: PNode) = for i in 0..