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

15 lines
178 B
V

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