| 1 | vlib/v/checker/tests/cast_fn_err.vv:24:7: warning: casting `nil` to function value should be done inside `unsafe{}` blocks |
| 2 | 22 | // wrong ones |
| 3 | 23 | _ := FnType(foo) |
| 4 | 24 | _ := FnType(nil) |
| 5 | | ~~~~~~~~~~~ |
| 6 | 25 | _ := FnType(0) |
| 7 | 26 | _ := FnType('foo') |
| 8 | vlib/v/checker/tests/cast_fn_err.vv:25:7: warning: casting number to function value should be done inside `unsafe{}` blocks |
| 9 | 23 | _ := FnType(foo) |
| 10 | 24 | _ := FnType(nil) |
| 11 | 25 | _ := FnType(0) |
| 12 | | ~~~~~~~~~ |
| 13 | 26 | _ := FnType('foo') |
| 14 | 27 | _ := FnType(none) |
| 15 | vlib/v/checker/tests/cast_fn_err.vv:23:7: error: casting a function value from one function signature, to another function signature, should be done inside `unsafe{}` blocks |
| 16 | 21 | |
| 17 | 22 | // wrong ones |
| 18 | 23 | _ := FnType(foo) |
| 19 | | ~~~~~~~~~~~ |
| 20 | 24 | _ := FnType(nil) |
| 21 | 25 | _ := FnType(0) |
| 22 | vlib/v/checker/tests/cast_fn_err.vv:24:14: error: `nil` is only allowed in `unsafe` code |
| 23 | 22 | // wrong ones |
| 24 | 23 | _ := FnType(foo) |
| 25 | 24 | _ := FnType(nil) |
| 26 | | ~~~ |
| 27 | 25 | _ := FnType(0) |
| 28 | 26 | _ := FnType('foo') |
| 29 | vlib/v/checker/tests/cast_fn_err.vv:26:7: error: invalid casting value to function |
| 30 | 24 | _ := FnType(nil) |
| 31 | 25 | _ := FnType(0) |
| 32 | 26 | _ := FnType('foo') |
| 33 | | ~~~~~~~~~~~~~ |
| 34 | 27 | _ := FnType(none) |
| 35 | 28 | _ := ?FnType(0) |
| 36 | vlib/v/checker/tests/cast_fn_err.vv:27:7: error: cannot cast `none` to `fn () bool` |
| 37 | 25 | _ := FnType(0) |
| 38 | 26 | _ := FnType('foo') |
| 39 | 27 | _ := FnType(none) |
| 40 | | ~~~~~~~~~~~~ |
| 41 | 28 | _ := ?FnType(0) |
| 42 | 29 | _ := ?FnType(nil) |
| 43 | vlib/v/checker/tests/cast_fn_err.vv:28:8: error: casting number to Option function is not allowed, only compatible function or `none` |
| 44 | 26 | _ := FnType('foo') |
| 45 | 27 | _ := FnType(none) |
| 46 | 28 | _ := ?FnType(0) |
| 47 | | ~~~~~~~~~ |
| 48 | 29 | _ := ?FnType(nil) |
| 49 | 30 | _ := ?FnType(foo) |
| 50 | vlib/v/checker/tests/cast_fn_err.vv:29:15: error: `nil` is only allowed in `unsafe` code |
| 51 | 27 | _ := FnType(none) |
| 52 | 28 | _ := ?FnType(0) |
| 53 | 29 | _ := ?FnType(nil) |
| 54 | | ~~~ |
| 55 | 30 | _ := ?FnType(foo) |
| 56 | 31 | } |
| 57 | vlib/v/checker/tests/cast_fn_err.vv:29:8: error: casting number to Option function is not allowed, only compatible function or `none` |
| 58 | 27 | _ := FnType(none) |
| 59 | 28 | _ := ?FnType(0) |
| 60 | 29 | _ := ?FnType(nil) |
| 61 | | ~~~~~~~~~~~ |
| 62 | 30 | _ := ?FnType(foo) |
| 63 | 31 | } |
| 64 | vlib/v/checker/tests/cast_fn_err.vv:30:8: error: casting a function value from one function signature, to another function signature, should be done inside `unsafe{}` blocks |
| 65 | 28 | _ := ?FnType(0) |
| 66 | 29 | _ := ?FnType(nil) |
| 67 | 30 | _ := ?FnType(foo) |
| 68 | | ~~~~~~~~~~~ |
| 69 | 31 | } |
| 70 | |