Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_assign_none_test.v
11
lines
·
10
sloc
·
147 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
test_main() {
2
mut
a := []?&int{}
3
a << ?&int(
none
)
4
a <<
none
5
dump(a[0])
6
dump(a[1])
7
println(a)
8
9
assert a[0] ==
none
10
assert a[1] ==
none
11
}
12