From b92666745e78bb252209af444761a586fe3a418b Mon Sep 17 00:00:00 2001 From: cooldome Date: Mon, 16 Nov 2020 11:39:28 +0000 Subject: [PATCH] fix #15910 (#15984) * fix #15910 * produce op of op is nil * Trigger build (cherry picked from commit a4d02f591c685b261a41a7b9b51aaba05c542499) --- compiler/liftdestructors.nim | 16 ++++++--- tests/arc/t14383.nim | 66 +++++++++++++++++++++++++++++++++++- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/compiler/liftdestructors.nim b/compiler/liftdestructors.nim index 1f9b031c03..0da4354dca 100644 --- a/compiler/liftdestructors.nim +++ b/compiler/liftdestructors.nim @@ -40,6 +40,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..