Skip to content

Commit

Permalink
fixes nim-lang/RFCs#257 [backport:1.2] (nim-lang#15479)
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq authored and mildred committed Jan 11, 2021
1 parent 95f6dcf commit 0f8c409
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/trees.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 0f8c409

Please sign in to comment.