fixes https://github.com/nim-lang/RFCs/issues/257 [backport:1.2] (#15479)
This commit is contained in:
parent
662c508075
commit
2288188fe9
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue