| 1 | vlib/v/checker/tests/fixed_array_conv.vv:3:5: notice: left-side of assignment expects a mutable reference, but variable `arr` is immutable, declare it with `mut` to make it mutable or clone it |
| 2 | 1 | arr := [2, 3]! |
| 3 | 2 | mut p := unsafe { nil } |
| 4 | 3 | p = arr |
| 5 | | ~~~ |
| 6 | 4 | mut ip := &int(unsafe { nil }) |
| 7 | 5 | ip = arr |
| 8 | vlib/v/checker/tests/fixed_array_conv.vv:5:6: notice: left-side of assignment expects a mutable reference, but variable `arr` is immutable, declare it with `mut` to make it mutable or clone it |
| 9 | 3 | p = arr |
| 10 | 4 | mut ip := &int(unsafe { nil }) |
| 11 | 5 | ip = arr |
| 12 | | ~~~ |
| 13 | 6 | _ = &int(arr) |
| 14 | 7 | _ = p |
| 15 | vlib/v/checker/tests/fixed_array_conv.vv:6:5: warning: cannot cast a fixed array (use e.g. `&arr[0]` instead) |
| 16 | 4 | mut ip := &int(unsafe { nil }) |
| 17 | 5 | ip = arr |
| 18 | 6 | _ = &int(arr) |
| 19 | | ~~~~~~~~~ |
| 20 | 7 | _ = p |
| 21 | 8 | _ = ip |
| 22 | vlib/v/checker/tests/fixed_array_conv.vv:3:3: error: mismatched types `voidptr` and `[2]int` |
| 23 | 1 | arr := [2, 3]! |
| 24 | 2 | mut p := unsafe { nil } |
| 25 | 3 | p = arr |
| 26 | | ^ |
| 27 | 4 | mut ip := &int(unsafe { nil }) |
| 28 | 5 | ip = arr |
| 29 | vlib/v/checker/tests/fixed_array_conv.vv:3:5: error: cannot assign to `p`: expected `voidptr`, not `[2]int` |
| 30 | 1 | arr := [2, 3]! |
| 31 | 2 | mut p := unsafe { nil } |
| 32 | 3 | p = arr |
| 33 | | ~~~ |
| 34 | 4 | mut ip := &int(unsafe { nil }) |
| 35 | 5 | ip = arr |
| 36 | vlib/v/checker/tests/fixed_array_conv.vv:5:4: error: mismatched types `&int` and `[2]int` |
| 37 | 3 | p = arr |
| 38 | 4 | mut ip := &int(unsafe { nil }) |
| 39 | 5 | ip = arr |
| 40 | | ^ |
| 41 | 6 | _ = &int(arr) |
| 42 | 7 | _ = p |
| 43 | vlib/v/checker/tests/fixed_array_conv.vv:5:6: error: cannot assign to `ip`: expected `&int`, not `[2]int` |
| 44 | 3 | p = arr |
| 45 | 4 | mut ip := &int(unsafe { nil }) |
| 46 | 5 | ip = arr |
| 47 | | ~~~ |
| 48 | 6 | _ = &int(arr) |
| 49 | 7 | _ = p |
| 50 | vlib/v/checker/tests/fixed_array_conv.vv:12:10: error: cannot use `[2]int` as `&u8` in argument 1 to `tos` |
| 51 | 10 | unsafe { |
| 52 | 11 | _ = memdup(arr, 1) |
| 53 | 12 | _ = tos(arr, 1) |
| 54 | | ~~~ |
| 55 | 13 | fn (p &int) {}(arr) |
| 56 | 14 | } |
| 57 | vlib/v/checker/tests/fixed_array_conv.vv:13:17: error: cannot use `[2]int` as `&int` in argument 1 to `anon` |
| 58 | 11 | _ = memdup(arr, 1) |
| 59 | 12 | _ = tos(arr, 1) |
| 60 | 13 | fn (p &int) {}(arr) |
| 61 | | ~~~ |
| 62 | 14 | } |
| 63 | |