Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
structs
/
short_struct_param_syntax_test.v
18
lines
·
16
sloc
·
207 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
struct
TOptions {
2
a int
3
}
4
5
fn
t(options TOptions) bool {
6
if
options.a == 1 {
7
return
true
8
}
9
return
false
10
}
11
12
fn
test_short_struct_as_parameter() {
13
if
t(a: 1) {
14
assert
true
15
return
16
}
17
assert
false
18
}
19