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

cgen: fix print(struct); use automatic referencing

This commit is contained in:
Alexander Medvednikov
2020-03-20 17:11:58 +01:00
parent 078f498b17
commit 6b571155f4
6 changed files with 8 additions and 7 deletions

View File

@ -365,7 +365,7 @@ fn (p mut Parser) struct_init(typ_ string) string {
t = p.table.find_type(t.name)
typ = t.name
}
if p.gen_struct_init(typ, &t) {
if p.gen_struct_init(typ, t) {
return typ
}
ptr := typ.contains('*')