fixes a critical bug about template instantiations in generics

This commit is contained in:
Andreas Rumpf
2016-06-05 16:43:13 +02:00
parent 3847348fdf
commit 03b64327ca

View File

@@ -205,7 +205,7 @@ proc semGenericStmt(c: PContext, n: PNode,
if macroToExpand(s):
styleCheckUse(fn.info, s)
result = semMacroExpr(c, n, n, s, {efNoSemCheck})
result = semGenericStmt(c, result, {}, ctx)
result = semGenericStmt(c, result, flags, ctx)
else:
n.sons[0] = symChoice(c, fn, s, scOption)
result = n
@@ -214,7 +214,7 @@ proc semGenericStmt(c: PContext, n: PNode,
if macroToExpand(s):
styleCheckUse(fn.info, s)
result = semTemplateExpr(c, n, s, {efNoSemCheck})
result = semGenericStmt(c, result, {}, ctx)
result = semGenericStmt(c, result, flags, ctx)
else:
n.sons[0] = symChoice(c, fn, s, scOption)
result = n