v2 / vlib / v / checker / tests / generic_mut_struct_index_err.out
14 lines · 14 sloc · 516 bytes · 28fb4e6d6dfc6d478b2f069d4d3fafc9a74e4236
Raw
1vlib/v/checker/tests/generic_mut_struct_index_err.vv:7:3: error: type `mut Heap[int]` does not support slicing
2 5 |
3 6 | fn (mut h Heap[T]) insert(mut element T, pos int) {
4 7 | h[pos] = element
5 | ~~~~~
6 8 | }
7 9 |
8vlib/v/checker/tests/generic_mut_struct_index_err.vv:7:11: error: cannot assign to `h[pos]`: expected `Heap[int]`, not `int`
9 5 |
10 6 | fn (mut h Heap[T]) insert(mut element T, pos int) {
11 7 | h[pos] = element
12 | ~~~~~~~
13 8 | }
14 9 |
15