prevent eval crashes due to PContext-dependent ops not being available in evalConstExpr
This commit is contained in:
parent
6378fbd66e
commit
89086a8e19
4 changed files with 40 additions and 42 deletions
|
|
@ -1144,7 +1144,7 @@ proc semPragmaBlock(c: PContext, n: PNode): PNode =
|
|||
|
||||
proc semStaticStmt(c: PContext, n: PNode): PNode =
|
||||
let a = semStmt(c, n.sons[0])
|
||||
result = evalStaticExpr(c.module, a, c.p.owner)
|
||||
result = evalStaticExpr(c, c.module, a, c.p.owner)
|
||||
if result.isNil:
|
||||
LocalError(n.info, errCannotInterpretNodeX, renderTree(n))
|
||||
result = emptyNode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue