Skip to content

Commit

Permalink
fixes nim-lang/RFCs#257 [backport:1.2] (#15479)
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq authored Oct 3, 2020
1 parent 662c508 commit 2288188
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 2288188

Please sign in to comment.