v2 / vlib / v / checker / tests / map_with_none_err.out
34 lines · 34 sloc · 1013 bytes · 0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1vlib/v/checker/tests/map_with_none_err.vv:2:6: warning: unused variable: `a`
2 1 | fn main() {
3 2 | mut a := {
4 | ^
5 3 | 'bar': none
6 4 | }
7vlib/v/checker/tests/map_with_none_err.vv:6:6: warning: unused variable: `b`
8 4 | }
9 5 |
10 6 | mut b := {
11 | ^
12 7 | 'foo': 1
13 8 | 'bar': none
14vlib/v/checker/tests/map_with_none_err.vv:11:6: warning: unused variable: `c`
15 9 | }
16 10 |
17 11 | mut c := {
18 | ^
19 12 | 'foo': ?int(none)
20 13 | 'bar': none
21vlib/v/checker/tests/map_with_none_err.vv:3:10: error: map value cannot be only `none`
22 1 | fn main() {
23 2 | mut a := {
24 3 | 'bar': none
25 | ~~~~
26 4 | }
27 5 |
28vlib/v/checker/tests/map_with_none_err.vv:8:10: error: invalid map value: expected `int`, not `none`
29 6 | mut b := {
30 7 | 'foo': 1
31 8 | 'bar': none
32 | ~~~~
33 9 | }
34 10 |
35