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