Skip to content

Commit

Permalink
fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
islonely committed Jan 5, 2025
1 parent e35d31f commit 903a108
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vlib/v/parser/containers.v
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn (mut p Parser) array_init(is_option bool, alias_array_type ast.Type) ast.Arra
// result of expr so we do those in checker
if elem_type != 0 {
if elem_type.has_flag(.result) {
p.error_with_pos('array does not support storing storing Result',
p.error_with_pos('arrays do not support storing Result values',
elem_type_pos)
}
idx := p.table.find_or_register_array(elem_type)
Expand Down
2 changes: 1 addition & 1 deletion vlib/v/parser/tests/array_init.out
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ vlib/v/parser/tests/array_init.vv:3:7: warning: use e.g. `x := [1]Type{}` instea
| ~~~~~~
4 | _ := []!int{}
5 | }
vlib/v/parser/tests/array_init.vv:4:9: error: array does not support storing storing Result
vlib/v/parser/tests/array_init.vv:4:9: error: arrays do not support storing Result values
2 | _ := []int
3 | _ := [1]int
4 | _ := []!int{}
Expand Down

0 comments on commit 903a108

Please sign in to comment.