1
0
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:
bogen85
2019-11-29 02:11:53 -06:00
committed by Alexander Medvednikov
parent 729f9c3391
commit e31d892598
3 changed files with 74 additions and 32 deletions

View 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
}