fixes #3192
This commit is contained in:
parent
94e504113e
commit
2e4b59f3d3
2 changed files with 2 additions and 2 deletions
|
|
@ -184,7 +184,7 @@ proc addHiddenParam(routine: PSym, param: PSym) =
|
|||
var params = routine.ast.sons[paramsPos]
|
||||
# -1 is correct here as param.position is 0 based but we have at position 0
|
||||
# some nkEffect node:
|
||||
param.position = params.len-1
|
||||
param.position = routine.typ.n.len-1
|
||||
addSon(params, newSymNode(param))
|
||||
incl(routine.typ.flags, tfCapturesEnv)
|
||||
assert sfFromGeneric in param.flags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue