From 57c52d05df6012a1a0e8577e255e61d1329c3a26 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 15 Jul 2016 13:29:22 +0200 Subject: [PATCH] better be safe than sorry --- compiler/semexprs.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 8ce29d2994..0f6422887e 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,