mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
19 lines
207 B
V
19 lines
207 B
V
struct TOptions {
|
|
a int
|
|
}
|
|
|
|
fn t(options TOptions) bool {
|
|
if options.a == 1 {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
fn test_short_struct_as_parameter() {
|
|
if t(a: 1) {
|
|
assert true
|
|
return
|
|
}
|
|
assert false
|
|
}
|