1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/fmt/tests/comptime_method_call_keep.vv

16 lines
191 B
V

import os
struct Dummy {}
fn (d Dummy) sample(x int) int {
return x + 1
}
fn main() {
$for method in Dummy.methods {
if os.args.len > 1 {
Dummy{}.$method(os.args[1].int())
}
}
}