1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: fix multi return with multiple blank identifiers

This commit is contained in:
joe-conigliaro 2019-10-01 21:49:15 +10:00 committed by Alexander Medvednikov
parent 282cd44cec
commit 8fe0e88c05

View File

@ -1437,8 +1437,10 @@ fn (p mut Parser) var_decl() {
}
for i, name in names {
var_token_idx := vtoken_idxs[i]
if name == '_' && names.len == 1 {
p.error_with_token_index('no new variables on left side of `:=`', var_token_idx)
if name == '_' {
if names.len == 1 {
p.error_with_token_index('no new variables on left side of `:=`', var_token_idx)
}
continue
}
typ := types[i]