mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
21 lines
276 B
V
21 lines
276 B
V
struct Config {
|
|
token string
|
|
}
|
|
|
|
struct Client {
|
|
x u64
|
|
y u64
|
|
}
|
|
|
|
fn new(config Config, shard_count ...int) ?&Client {
|
|
return &Client{1, 2}
|
|
}
|
|
|
|
fn test_can_compile_an_empty_var_arg() {
|
|
x := new(Config{
|
|
token: 'xyz'
|
|
}) or { panic(err) }
|
|
assert x.x == 1
|
|
assert x.y == 2
|
|
}
|