v/vlib/v/tests/short_struct_param_syntax_t...

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
}