* fixes #16069; refs https://github.com/nim-lang/RFCs/issues/257 [backport:1.2] [backport:1.4] * make tests green again
This commit is contained in:
parent
1d14b2c9e6
commit
d306a04466
8 changed files with 29 additions and 15 deletions
|
|
@ -211,6 +211,6 @@ proc stupidStmtListExpr*(n: PNode): bool =
|
|||
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
|
||||
result = orig.kind != cnst.kind and
|
||||
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