From 2288188fe9a9d854a167dd270eb8d72d19676865 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 3 Oct 2020 17:34:42 +0200 Subject: [PATCH] fixes https://github.com/nim-lang/RFCs/issues/257 [backport:1.2] (#15479) --- compiler/trees.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/trees.nim b/compiler/trees.nim index 2cf6b4f6794d6..c5e2cb7b4be6a 100644 --- a/compiler/trees.nim +++ b/compiler/trees.nim @@ -200,5 +200,5 @@ proc dontInlineConstant*(orig, cnst: PNode): bool {.inline.} = # symbols that expand to a complex constant (array, etc.) should not be # inlined, unless it's the empty array: result = orig.kind == nkSym and - cnst.kind in {nkCurly, nkPar, nkTupleConstr, nkBracket} and - cnst.len != 0 + cnst.kind in {nkCurly, nkPar, nkTupleConstr, nkBracket, nkObjConstr} and + cnst.len > ord(cnst.kind == nkObjConstr)