summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-08-25 18:11:05 +0300
committerZahary Karadjov <zahary@gmail.com>2013-08-25 18:11:28 +0300
commit89086a8e19292ad986baa808ff42ccad32bf2636 (patch)
treedba214f1beaeac5556f33cccbb3a476aca94cae5 /compiler/semstmts.nim
parent6378fbd66ef9ff85510bf0583610bfc84dc6528f (diff)
downloadNim-89086a8e19292ad986baa808ff42ccad32bf2636.tar.gz
prevent eval crashes due to PContext-dependent ops not being available in evalConstExpr
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index a15b3e10a..3b83290ea 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -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