This commit is contained in:
Andreas Rumpf 2020-10-03 17:34:42 +02:00 • committed by GitHub
commit 2288188fe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -200,5 +200,5 @@ proc dontInlineConstant*(orig, cnst: PNode): bool {.inline.} =
# symbols that expand to a complex constant (array, etc.) should not be # symbols that expand to a complex constant (array, etc.) should not be
# inlined, unless it's the empty array: # inlined, unless it's the empty array:
result = orig.kind == nkSym and result = orig.kind == nkSym and
cnst.kind in {nkCurly, nkPar, nkTupleConstr, nkBracket} and cnst.kind in {nkCurly, nkPar, nkTupleConstr, nkBracket, nkObjConstr} and
cnst.len != 0 cnst.len > ord(cnst.kind == nkObjConstr)