proc arguments are in scope when the result type definition is being processed
This is intended for type deduction depending on the arguments proc foo(x: type): type(expr(x))
This commit is contained in:
parent
e4e74034c2
commit
de4b894541
5 changed files with 16 additions and 5 deletions
|
|
@ -135,7 +135,8 @@ proc generateInstance(c: PContext, fn: PSym, pt: TIdTable,
|
|||
if n.sons[paramsPos].kind != nkEmpty:
|
||||
removeDefaultParamValues(n.sons[ParamsPos])
|
||||
semParamList(c, n.sons[ParamsPos], nil, result)
|
||||
addParams(c, result.typ.n)
|
||||
# XXX: obsoleted - happens in semParamList #
|
||||
# addParams(c, result.typ.n)
|
||||
else:
|
||||
result.typ = newTypeS(tyProc, c)
|
||||
addSon(result.typ, nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue