v2 / vlib / v / checker / tests / cast_to_byte_err.out
14 lines · 14 sloc · 511 bytes · 173e6a943b43c332c1ead547e165b55ad4b74622
Raw
1vlib/v/checker/tests/cast_to_byte_err.vv:10:7: error: cannot cast type `string` to `u8`
2 8 | fn main() {
3 9 | // should be errors:
4 10 | _ := u8('hello')
5 | ~~~~~~~~~~~
6 11 | _ := u8(SAlias('hello'))
7 12 |
8vlib/v/checker/tests/cast_to_byte_err.vv:11:7: error: cannot cast type `SAlias` to `u8`
9 9 | // should be errors:
10 10 | _ := u8('hello')
11 11 | _ := u8(SAlias('hello'))
12 | ~~~~~~~~~~~~~~~~~~~
13 12 |
14 13 | // should be allowed:
15