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:
committed by
Alexander Medvednikov
parent
60d932e57d
commit
23e30962b9
@@ -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;'
|
||||
|
||||
Reference in New Issue
Block a user