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

17 lines
178 B
V

struct Foo {
mut:
f ?fn (int)
g fn (int)
}
fn test_main() {
mut foo := ?Foo{}
assert foo == none
foo = Foo{}
assert foo != none
println(foo?.f)
println('${foo?.f}')
}