v4 / vlib / v / checker / tests / invalid_string_cast_to_pointers_err.out
17 lines · 17 sloc · 845 bytes · b8b0cfddd5862651b507e10763e6cb3a12da9b49
Raw
1vlib/v/checker/tests/invalid_string_cast_to_pointers_err.vv:2:9: error: cannot cast string to `voidptr`, use voidptr(s.str) instead
2 1 | test := 'test'
3 2 | println(voidptr(test))
4 | ~~~~~~~~~~~~~
5 3 | println(byteptr(test))
6 4 | println(charptr(test))
7vlib/v/checker/tests/invalid_string_cast_to_pointers_err.vv:3:9: error: cannot cast string to `byteptr` outside `unsafe`, use byteptr(s.str) instead
8 1 | test := 'test'
9 2 | println(voidptr(test))
10 3 | println(byteptr(test))
11 | ~~~~~~~~~~~~~
12 4 | println(charptr(test))
13vlib/v/checker/tests/invalid_string_cast_to_pointers_err.vv:4:9: error: cannot cast string to `charptr` outside `unsafe`, use charptr(s.str) instead
14 2 | println(voidptr(test))
15 3 | println(byteptr(test))
16 4 | println(charptr(test))
17 | ~~~~~~~~~~~~~
18