Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
vxx2
/
vlib
/
v
/
checker
/
tests
/
option_selector_fn_unwrap_err.vv
13
lines
·
11
sloc
·
155 bytes
·
a200c4540a5bac23f9ef5f308a2e0c079c54e12c
Raw
1
struct Foo {
2
mut:
3
func ?fn (voidptr) bool
4
}
5
6
fn callback(foo &Foo) bool {
7
return foo.func? == callback
8
}
9
10
fn main() {
11
t := Foo{}
12
assert callback(&t)
13
}
14