Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
structs
/
nested_struct_embed_selector_test.v
20
lines
·
16
sloc
·
169 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
struct
Foo {
2
mut
:
3
x int
4
}
5
6
struct
Bar {
7
Foo
8
}
9
10
struct
Baz {
11
Bar
12
}
13
14
fn
test_nested_struct_embed() {
15
mut
baz := Baz{}
16
baz.x = 3
17
18
println(baz.x)
19
assert baz.x == 3
20
}
21