Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
fmt
/
tests
/
comptime_method_call_keep.vv
15
lines
·
12
sloc
·
191 bytes
·
e6a04905e9890a037928b30b3efda089c738ef69
Raw
1
import os
2
3
struct Dummy {}
4
5
fn (d Dummy) sample(x int) int {
6
return x + 1
7
}
8
9
fn main() {
10
$for method in Dummy.methods {
11
if os.args.len > 1 {
12
Dummy{}.$method(os.args[1].int())
13
}
14
}
15
}
16