v4 / vlib / v / checker / tests / map_option_key_err.out
20 lines · 20 sloc · 796 bytes · 9989453673ee8cb6a3324abb16f551669d9c4768
Raw
1vlib/v/checker/tests/map_option_key_err.vv:7:10: error: invalid key: cannot use `?string` as `string`, it must be unwrapped first
2 5 | mut c := cuid2.new()
3 6 | key := c.next()
4 7 | _ = m[c.next()]
5 | ~~~~~~
6 8 | m[c.next()] = 1
7 9 | m[key]++
8vlib/v/checker/tests/map_option_key_err.vv:8:6: error: invalid key: cannot use `?string` as `string`, it must be unwrapped first
9 6 | key := c.next()
10 7 | _ = m[c.next()]
11 8 | m[c.next()] = 1
12 | ~~~~~~
13 9 | m[key]++
14 10 | }
15vlib/v/checker/tests/map_option_key_err.vv:9:4: error: invalid key: cannot use `?string` as `string`, it must be unwrapped first
16 7 | _ = m[c.next()]
17 8 | m[c.next()] = 1
18 9 | m[key]++
19 | ~~~
20 10 | }
21