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

compiler: map[string]pointer, ?pointer, fix []pointer

This commit is contained in:
れもん
2019-12-22 07:44:16 +09:00
committed by Alexander Medvednikov
parent b76227b781
commit 28ecfb231d
14 changed files with 98 additions and 48 deletions

View File

@ -428,7 +428,7 @@ fn (p mut Parser) struct_init(typ_ string) string {
// init map fields
if field_typ.starts_with('map_') {
p.gen_struct_field_init(sanitized_name)
p.gen_empty_map(field_typ[4..])
p.gen_empty_map(parse_pointer(field_typ[4..]))
inited_fields << sanitized_name
if i != t.fields.len - 1 {
p.gen(',')