v2 / vlib / v / checker / tests / fn_call_ref_incompatible_u8_test.vv
10 lines · 8 sloc · 141 bytes · d8cf65df1a091027cbcc2548a8ed5d4def178213
Raw
1module main
2
3fn accept_only_u8_references(x &u8) {
4 println(ptr_str(x))
5}
6
7fn test_main() {
8 a := [1, 2, 3]
9 accept_only_u8_references(&a)
10}
11