expr params implemented for procs; paving the way for type classes

This commit is contained in:
Zahary Karadjov 2012-03-21 23:48:03 +02:00
commit 3a5cf3d63a
6 changed files with 88 additions and 29 deletions

View file

@ -641,8 +641,6 @@ proc semLambda(c: PContext, n: PNode): PNode =
illFormedAst(n) # process parameters:
if n.sons[paramsPos].kind != nkEmpty:
semParamList(c, n.sons[ParamsPos], nil, s)
# XXX: obsoleted - happens in semParamList
# addParams(c, s.typ.n)
ParamsTypeCheck(c, s.typ)
else:
s.typ = newTypeS(tyProc, c)
@ -690,7 +688,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
# we have a list of implicit type parameters:
n.sons[genericParamsPos] = gp
# check for semantics again:
semParamList(c, n.sons[ParamsPos], nil, s)
# semParamList(c, n.sons[ParamsPos], nil, s)
else:
s.typ = newTypeS(tyProc, c)
addSon(s.typ, nil)