fixes lots of regressions
This commit is contained in:
parent
43de61f37b
commit
1bdc0d1dd3
5 changed files with 20 additions and 15 deletions
|
|
@ -1139,9 +1139,10 @@ 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)
|
||||
result = evalStaticExpr(c.module, a, c.p.owner)
|
||||
if result.isNil:
|
||||
LocalError(n.info, errCannotInterpretNodeX, renderTree(n))
|
||||
result = emptyNode
|
||||
elif result.kind == nkEmpty:
|
||||
result = newNodeI(nkDiscardStmt, n.info, 1)
|
||||
result.sons[0] = emptyNode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue