Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
generics
/
generic_fn_with_anon_fn_test.v
11
lines
·
10
sloc
·
151 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
foo[T]() string {
2
x :=
fn
() string {
3
return
'ok'
4
}
5
return
x()
6
}
7
8
fn
test_generic_fn_with_anon_fn() {
9
ret := foo[int]()
10
assert ret ==
'ok'
11
}
12