fixes #537
This commit is contained in:
parent
6d9177c6f1
commit
e73fd64f38
3 changed files with 28 additions and 10 deletions
|
|
@ -601,6 +601,9 @@ proc evalAtCompileTime(c: PContext, n: PNode): PNode =
|
|||
result = n
|
||||
if n.kind notin nkCallKinds or n.sons[0].kind != nkSym: return
|
||||
var callee = n.sons[0].sym
|
||||
# workaround for bug #537 (overly aggressive inlining leading to
|
||||
# wrong NimNode semantics):
|
||||
if n.typ != nil and tfTriggersCompileTime in n.typ.flags: return
|
||||
|
||||
# constant folding that is necessary for correctness of semantic pass:
|
||||
if callee.magic != mNone and callee.magic in ctfeWhitelist and n.typ != nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue