Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_nested_struct_test.v
15
lines
·
14
sloc
·
189 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
struct
Node {
2
mut
:
3
next ?&Node
4
}
5
6
fn
test_struct_nested_option() {
7
mut
b := Node{}
8
mut
a := Node{
9
next: &b
10
}
11
dump(a)
12
dump(a.next)
13
dump(a.next?.next)
14
assert a.next?.next ==
none
15
}
16