mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
make _V_mret_ unique by putting p.token_idx in it
This commit is contained in:

committed by
Alexander Medvednikov

parent
729f9c3391
commit
e31d892598
15
vlib/compiler/tests/repeated_multiret_values_test.v
Normal file
15
vlib/compiler/tests/repeated_multiret_values_test.v
Normal file
@@ -0,0 +1,15 @@
|
||||
// verify fix for #2913
|
||||
|
||||
fn some_multiret_fn(a int, b int) (int, int) {
|
||||
return a+1, b+1
|
||||
}
|
||||
|
||||
fn test_repeated_multiple_multiret() {
|
||||
a, b := some_multiret_fn(1,2)
|
||||
assert a == 2
|
||||
assert b == 3
|
||||
|
||||
c, d := some_multiret_fn(3,4)
|
||||
assert c == 4
|
||||
assert d == 5
|
||||
}
|
Reference in New Issue
Block a user