Introduce localErrorNode (#17785)

This commit is contained in:
Clyybber 2021-04-19 17:19:21 +02:00 • committed by GitHub
commit 438afb4db9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 24 deletions

View file

@ -725,8 +725,7 @@ proc semForVars(c: PContext, n: PNode; flags: TExprFlags): PNode =
if n.len == 3:
if n[0].kind == nkVarTuple:
if n[0].len-1 != iterAfterVarLent.len:
localError(c.config, n[0].info, errWrongNumberOfVariables)
return errorNode(c, n)
return localErrorNode(c, n, n[0].info, errWrongNumberOfVariables)
for i in 0..<n[0].len-1:
var v = symForVar(c, n[0][i])