mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-07 04:14:19 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user