globalError instead of localError when failing infinite recursion
globalError throws an exception, so this works for `nim check` as well.
This commit is contained in:
parent
c19d6cb620
commit
d77c883911
1 changed files with 1 additions and 1 deletions
|
|
@ -788,7 +788,7 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
|
|||
else:
|
||||
for i in 0 .. <paramType.sons.len:
|
||||
if paramType.sons[i] == paramType:
|
||||
localError(info, errIllegalRecursionInTypeX, typeToString(paramType))
|
||||
globalError(info, errIllegalRecursionInTypeX, typeToString(paramType))
|
||||
var lifted = liftingWalk(paramType.sons[i])
|
||||
if lifted != nil:
|
||||
paramType.sons[i] = lifted
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue