Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
options
/
option_or_block_test.v
14
lines
·
12
sloc
·
154 bytes
·
6488041a749df9762348d019c4223908c476f2e2
Raw
1
fn
foo(val ?int) {
2
if
val ==
none
{
3
a := val
or
{
return
}
4
5
assert
false
6
println(a)
7
}
8
assert
false
9
}
10
11
fn
test_main() {
12
foo(
none
)
13
assert
true
14
}
15