This commit is contained in:
Araq
2013-06-27 08:19:03 +02:00
parent ed56b8c173
commit 8d4f5038d0
2 changed files with 10 additions and 0 deletions

View File

@@ -1290,6 +1290,7 @@ proc newAnonSym(kind: TSymKind, info: TLineInfo,
proc semExpandToAst(c: PContext, n: PNode): PNode =
var macroCall = n[1]
var expandedSym = expectMacroOrTemplateCall(c, macroCall)
if expandedSym.kind == skError: return n
macroCall.sons[0] = newSymNode(expandedSym, macroCall.info)
markUsed(n, expandedSym)

View File

@@ -15,3 +15,12 @@ else:
return tkUnknown
case_token: inc i
#bug #488
macro foo: stmt =
var exp = newCall("whatwhat", newIntLitNode(1))
if compiles(getAst(exp)): return exp
else: echo "Does not compute!"
foo()