summary refs log tree commit diff stats
path: root/compiler/semexprs.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-15 13:29:22 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-15 13:29:22 +0200
commit57c52d05df6012a1a0e8577e255e61d1329c3a26 (patch)
tree96f803c86fef12cf46262aa57d58113d1da25675 /compiler/semexprs.nim
parent0834cd63d99a8a63682a033bd6222dc6cee4b3a9 (diff)
downloadNim-57c52d05df6012a1a0e8577e255e61d1329c3a26.tar.gz
better be safe than sorry
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r--compiler/semexprs.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 8ce29d299..0f6422887 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -1650,7 +1650,8 @@ proc semExpandToAst(c: PContext, n: PNode): PNode =
   # Preserve the magic symbol in order to be handled in evals.nim
   internalAssert n.sons[0].sym.magic == mExpandToAst
   #n.typ = getSysSym("NimNode").typ # expandedSym.getReturnType
-  n.typ = sysTypeFromName"NimNode"
+  n.typ = if getCompilerProc("NimNode") != nil: sysTypeFromName"NimNode"
+          else: sysTypeFromName"PNimrodNode"
   result = n
 
 proc semExpandToAst(c: PContext, n: PNode, magicSym: PSym,