bugfix: removed newSons legacy

This commit is contained in:
Araq 2012-01-07 11:10:14 +01:00
commit 0e22a51095
4 changed files with 15 additions and 10 deletions

View file

@ -246,7 +246,8 @@ proc semGenericStmt(c: PContext, n: PNode,
of nkProcDef, nkMethodDef, nkConverterDef, nkMacroDef, nkTemplateDef,
nkIteratorDef, nkLambda:
checkSonsLen(n, bodyPos + 1)
addPrelimDecl(c, newSymS(skUnknown, getIdentNode(n.sons[0]), c))
if n.kind != nkLambda:
addPrelimDecl(c, newSymS(skUnknown, getIdentNode(n.sons[0]), c))
openScope(c.tab)
n.sons[genericParamsPos] = semGenericStmt(c, n.sons[genericParamsPos],
flags, toBind)