fixes lots of regressions
This commit is contained in:
parent
43de61f37b
commit
1bdc0d1dd3
5 changed files with 20 additions and 15 deletions
|
|
@ -590,7 +590,7 @@ proc evalAtCompileTime(c: PContext, n: PNode): PNode =
|
|||
call.add(a)
|
||||
#echo "NOW evaluating at compile time: ", call.renderTree
|
||||
if sfCompileTime in callee.flags:
|
||||
result = evalStaticExpr(c.module, call)
|
||||
result = evalStaticExpr(c.module, call, c.p.owner)
|
||||
if result.isNil:
|
||||
LocalError(n.info, errCannotInterpretNodeX, renderTree(call))
|
||||
else:
|
||||
|
|
@ -601,9 +601,10 @@ proc evalAtCompileTime(c: PContext, n: PNode): PNode =
|
|||
|
||||
proc semStaticExpr(c: PContext, n: PNode): PNode =
|
||||
let a = semExpr(c, n.sons[0])
|
||||
result = evalStaticExpr(c.module, a)
|
||||
result = evalStaticExpr(c.module, a, c.p.owner)
|
||||
if result.isNil:
|
||||
LocalError(n.info, errCannotInterpretNodeX, renderTree(n))
|
||||
result = emptyNode
|
||||
|
||||
proc semOverloadedCallAnalyseEffects(c: PContext, n: PNode, nOrig: PNode,
|
||||
flags: TExprFlags): PNode =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue