Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
gen
/
c
/
testdata
/
struct_fn_member_print.vv
18
lines
·
14
sloc
·
221 bytes
·
0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1
module main
2
3
type Function = fn (int)
4
5
struct MyStruct {
6
func Function @[required]
7
}
8
9
fn implementation(size int) {
10
println('size is ${size}')
11
}
12
13
fn main() {
14
m := MyStruct{
15
func: implementation
16
}
17
println('${m}')
18
}
19