parser: fix multi return with multiple blank identifiers

pull/2185/head^2
joe-conigliaro 2019-10-01 21:49:15 +10:00 committed by Alexander Medvednikov
parent 282cd44cec
commit 8fe0e88c05
1 changed files with 4 additions and 2 deletions

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 {
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]