v/vlib/v/tests/skip_unused/method_as_fn_pointer.vv

13 lines
99 B
V

struct Foo {
x int
}
fn (f Foo) hi() int {
return f.x
}
fn main() {
f := Foo{123}
_ = f.hi
}