v2 / vlib / v / tests / multiret_with_result_test.v
15 lines · 13 sloc · 164 bytes · 757929392e0e7a75fc1272116460981e589737d5
Raw
1@[heap]
2struct Foo {
3 a string
4 b int
5}
6
7fn ret() !(int, Foo) {
8 return 0, Foo{}
9}
10
11fn test_multiret_with_result() {
12 _, foo := ret()!
13 println(foo)
14 assert true
15}
16