| 1 | vlib/v/checker/tests/generics_struct_init_err.vv:14:2: notice: uninitialized `fn` struct fields are not allowed, since they can result in segfaults; use `?fn` or `@[required]` or initialize the field with `=` (if you absolutely want to have unsafe function pointers, use `= unsafe { nil }`) |
| 2 | 12 | |
| 3 | 13 | struct FnHolder2[T] { |
| 4 | 14 | func fn (int) int |
| 5 | | ~~~~~~~~~~~~~~~~~ |
| 6 | 15 | } |
| 7 | 16 | |
| 8 | vlib/v/checker/tests/generics_struct_init_err.vv:67:8: error: could not infer generic type `T` in generic struct `FnHolder2[T]` |
| 9 | 65 | ret = holder_call_22(neg, 5) |
| 10 | 66 | assert ret == -5 |
| 11 | 67 | ret = FnHolder2{neg}.call(6) |
| 12 | | ~~~~~~~~~~~~~~ |
| 13 | 68 | assert ret == -6 |
| 14 | 69 | } |
| 15 | vlib/v/checker/tests/generics_struct_init_err.vv:67:23: error: could not infer generic type `T` in call to `call` |
| 16 | 65 | ret = holder_call_22(neg, 5) |
| 17 | 66 | assert ret == -5 |
| 18 | 67 | ret = FnHolder2{neg}.call(6) |
| 19 | | ~~~~~~~ |
| 20 | 68 | assert ret == -6 |
| 21 | 69 | } |
| 22 | vlib/v/checker/tests/generics_struct_init_err.vv:44:25: error: could not infer generic type `T` in call to `call` |
| 23 | 42 | |
| 24 | 43 | fn holder_call_12[T](func T, a int) int { |
| 25 | 44 | return FnHolder1{func}.call(a) |
| 26 | | ~~~~~~~ |
| 27 | 45 | } |
| 28 | 46 | |
| 29 | vlib/v/checker/tests/generics_struct_init_err.vv:48:25: error: could not infer generic type `T` in call to `call` |
| 30 | 46 | |
| 31 | 47 | fn holder_call_22[T](func T, a int) int { |
| 32 | 48 | return FnHolder2{func}.call(a) |
| 33 | | ~~~~~~~ |
| 34 | 49 | } |
| 35 | 50 | |
| 36 | |