v2 / vlib / v / tests / aliases / aliased_array_method_call_test.v
10 lines · 8 sloc · 206 bytes · 6488041a749df9762348d019c4223908c476f2e2
Raw
1fn get_bytes_array() []u8 {
2 return [u8(97), 98, 99]
3}
4
5fn test_element_aliased_array_method_call() {
6 assert get_bytes_array().bytestr() == 'abc'
7
8 arr := [u8(97), 98, 99]
9 assert arr.bytestr() == 'abc'
10}
11