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

15 lines
178 B
V

fn func1() ?int {
return 0
}
fn func2() ?(int, int) {
return func1()?, 1
}
fn test_return_option() {
a, b := func2()?
println('${a}, ${b}')
assert a == 0
assert b == 1
}