v/vlib/v/checker/tests/assign_to_typeless_variable...

19 lines
618 B
Plaintext

vlib/v/checker/tests/assign_to_typeless_variable_err.vv:2:3: warning: unused variable: `val`
1 | fn main() {
2 | val := {}
| ~~~
3 | val = 1
4 | }
vlib/v/checker/tests/assign_to_typeless_variable_err.vv:2:10: error: invalid empty map initialisation syntax, use e.g. map[string]int{} instead
1 | fn main() {
2 | val := {}
| ~~
3 | val = 1
4 | }
vlib/v/checker/tests/assign_to_typeless_variable_err.vv:3:3: error: `val` is immutable, declare it with `mut` to make it mutable
1 | fn main() {
2 | val := {}
3 | val = 1
| ~~~
4 | }