Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_struct_init_interface_test.v
18
lines
·
15
sloc
·
200 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
interface
IPerson {
2
name string
3
age int
4
}
5
6
struct
PersonImpl {
7
name string
8
age int
9
}
10
11
struct
Person {
12
other ?IPerson = PersonImpl{}
13
}
14
15
fn
test_main() {
16
a := Person{}
17
assert a.other !=
none
18
}
19