mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
10 lines
145 B
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
|
|
}
|