diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 77fcd0b83a..3a11f8f402 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -760,7 +760,7 @@ pub fn (mut c Checker) infix_expr(mut infix_expr ast.InfixExpr) table.Type { c.fail_if_immutable(infix_expr.right) } if elem_type.is_ptr() && !right_type.is_ptr() { - c.error('cannon push non-reference `$right.source_name` on `$left.source_name`', + c.error('cannot push non-reference `$right.source_name` on `$left.source_name`', right_pos) } } else { @@ -3721,7 +3721,7 @@ pub fn (mut c Checker) chan_init(mut node ast.ChanInit) table.Type { } pub fn (mut c Checker) map_init(mut node ast.MapInit) table.Type { - // `x ;= map[string]string` - set in parser + // `x := map[string]string` - set in parser if node.typ != 0 { info := c.table.get_type_symbol(node.typ).map_info() key_sym := c.table.get_type_symbol(info.key_type) diff --git a/vlib/v/checker/tests/chan_mut.out b/vlib/v/checker/tests/chan_mut.out index 86835c45b4..e82419b97d 100644 --- a/vlib/v/checker/tests/chan_mut.out +++ b/vlib/v/checker/tests/chan_mut.out @@ -5,7 +5,7 @@ vlib/v/checker/tests/chan_mut.vv:8:8: error: `v` is immutable, declare it with ` | ^ 9 | mut w := St{} 10 | ch <- w -vlib/v/checker/tests/chan_mut.vv:10:8: error: cannon push non-reference `St` on `chan mut St` +vlib/v/checker/tests/chan_mut.vv:10:8: error: cannot push non-reference `St` on `chan mut St` 8 | ch <- v 9 | mut w := St{} 10 | ch <- w @@ -19,7 +19,7 @@ vlib/v/checker/tests/chan_mut.vv:12:8: error: `x` is immutable, declare it with | ^ 13 | mut y := St{} 14 | ch <- y -vlib/v/checker/tests/chan_mut.vv:14:8: error: cannon push non-reference `St` on `chan mut St` +vlib/v/checker/tests/chan_mut.vv:14:8: error: cannot push non-reference `St` on `chan mut St` 12 | ch <- x 13 | mut y := St{} 14 | ch <- y diff --git a/vlib/v/checker/tests/chan_ref.out b/vlib/v/checker/tests/chan_ref.out index 7675b91824..d120ce91a8 100644 --- a/vlib/v/checker/tests/chan_ref.out +++ b/vlib/v/checker/tests/chan_ref.out @@ -1,11 +1,11 @@ -vlib/v/checker/tests/chan_ref.vv:10:8: error: cannon push non-reference `St` on `chan &St` +vlib/v/checker/tests/chan_ref.vv:10:8: error: cannot push non-reference `St` on `chan &St` 8 | fn f(ch chan &St, sem sync.Semaphore) { 9 | w := St{} 10 | ch <- w | ^ 11 | mut x := St{} 12 | ch <- x -vlib/v/checker/tests/chan_ref.vv:12:8: error: cannon push non-reference `St` on `chan &St` +vlib/v/checker/tests/chan_ref.vv:12:8: error: cannot push non-reference `St` on `chan &St` 10 | ch <- w 11 | mut x := St{} 12 | ch <- x