v2: fix condition in AssignStmt

pull/3862/head
Joe Conigliaro 2020-02-27 21:15:30 +11:00
parent 237d83b2ee
commit aba0bb5e01
1 changed files with 1 additions and 1 deletions

View File

@ -1527,7 +1527,7 @@ pub fn (p mut Parser) assign_stmt() ast.AssignStmt {
expr,_ := p.expr(0)
is_decl := op == .decl_assign
for ident in idents {
if is_decl && ident.kind == .blank_ident {
if is_decl && ident.kind != .blank_ident {
if p.scope.known_var(ident.name) {
p.error('redefinition of `$ident.name`')
}