1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/fixed_array_of_fn_test.v

10 lines
145 B
V

fn foo(a string) int {
return 10 + a.len
}
fn test_fixed_array_fn_index() {
a := [foo]!
println(a[0]('hello'))
assert a[0]('hello') == 15
}