From bc8aab47756c7170bb291e3c08a3654d7e310c3c Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 9 Sep 2020 17:59:51 +0200 Subject: [PATCH] checker: fix := test --- vlib/v/checker/tests/assign_mut.out | 10 ++-------- vlib/v/parser/parser.v | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/vlib/v/checker/tests/assign_mut.out b/vlib/v/checker/tests/assign_mut.out index 178baf481..93a1d06d6 100644 --- a/vlib/v/checker/tests/assign_mut.out +++ b/vlib/v/checker/tests/assign_mut.out @@ -1,13 +1,7 @@ -vlib/v/checker/tests/assign_mut.vv:3:9: error: `mut` not allowed with `=` (use `:=` to declare a variable) +vlib/v/checker/tests/assign_mut.vv:3:11: error: expecting `:=` (e.g. `mut x :=`) 1 | fn main() { 2 | mut z := 1 3 | mut z = 1 - | ^ + | ^ 4 | mut i := 2 5 | i, mut z = 2,3 -vlib/v/checker/tests/assign_mut.vv:5:12: error: `mut` not allowed with `=` (use `:=` to declare a variable) - 3 | mut z = 1 - 4 | mut i := 2 - 5 | i, mut z = 2,3 - | ^ - 6 | } diff --git a/vlib/v/parser/parser.v b/vlib/v/parser/parser.v index f77d67db6..1ac520ce8 100644 --- a/vlib/v/parser/parser.v +++ b/vlib/v/parser/parser.v @@ -851,9 +851,6 @@ fn (mut p Parser) parse_multi_expr(is_top_level bool) ast.Stmt { // 1, a, c ... } // multi-expression // a, mut b ... :=/= // multi-assign // collect things upto hard boundaries - $if debug { - p.warn('xxx') - } tok := p.tok left, left_comments := p.expr_list() left0 := left[0] -- 2.39.5