v4 / vlib / v / checker / tests / function_cast_outside_unsafe_err.vv
8 lines · 6 sloc · 98 bytes · 0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1type FnA = fn ()
2
3type FnB = fn (int)
4
5fn main() {
6 f := fn () {}
7 println(FnB(f)) // not FnA()
8}
9