1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/option_void_2_test.v

13 lines
124 B
V

fn test_optional_void() {
foo(22)?
assert true
}
fn foo(n int) ? {
if n > 0 {
println(n)
} else {
return none
}
}