1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler: multiple returns - add test & fix use with array/map

This commit is contained in:
joe-conigliaro
2019-09-23 20:39:35 +10:00
committed by Alexander Medvednikov
parent 60d932e57d
commit 23e30962b9
3 changed files with 25 additions and 8 deletions

View File

@@ -293,7 +293,7 @@ fn (p mut Parser) fn_decl() {
name: typ,
mod: p.mod
})
for i, t in typ.replace('MultiReturn_', '').replace('0ptr0', '*').split('_') {
for i, t in typ.replace('MultiReturn_', '').replace('_ZptrZ_', '*').split('_Z_') {
p.table.add_field(typ, 'var_$i', t, false, '', .public)
}
p.cgen.typedefs << 'typedef struct $typ $typ;'