diff options
author | flywind <xzsflywind@gmail.com> | 2021-03-30 00:28:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 09:28:55 -0700 |
commit | 3f9c51a332dc798e1f4d61480ca8b6048ab281cd (patch) | |
tree | 4beebafcb286f98fd2456a8defc4af2b7bb61874 /compiler | |
parent | 7ad49950bd5ec05f145dc43ae35f51127ea76366 (diff) | |
download | Nim-3f9c51a332dc798e1f4d61480ca8b6048ab281cd.tar.gz |
[nim check]fix #17460 (#17569)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semstmts.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index fee43162e..bbfd49e2a 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -726,6 +726,8 @@ proc semForVars(c: PContext, n: PNode; flags: TExprFlags): PNode = if n[0].kind == nkVarTuple: if n[0].len-1 != iterAfterVarLent.len: localError(c.config, n[0].info, errWrongNumberOfVariables) + return errorNode(c, n) + for i in 0..<n[0].len-1: var v = symForVar(c, n[0][i]) if getCurrOwner(c).kind == skModule: incl(v.flags, sfGlobal) |