bootstraps fine with overloadable templates

This commit is contained in:
Zahary Karadjov 2011-12-15 18:39:44 +02:00
commit e5bd3b5b97
14 changed files with 230 additions and 143 deletions

View file

@ -168,8 +168,8 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
pushOwner(s)
openScope(c.tab)
n.sons[namePos] = newSymNode(s) # check that no pragmas exist:
if n.sons[pragmasPos].kind != nkEmpty:
LocalError(n.info, errNoPragmasAllowedForX, "template")
if n.sons[pragmasPos].kind != nkEmpty:
pragma(c, s, n.sons[pragmasPos], templatePragmas)
# check that no generic parameters exist:
if n.sons[genericParamsPos].kind != nkEmpty:
LocalError(n.info, errNoGenericParamsAllowedForX, "template")