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

Register map type while declaration

This commit is contained in:
teggot 2019-08-26 17:42:18 +03:00 committed by Alexander Medvednikov
parent 857cf00caf
commit f34d14d901

View File

@ -2635,6 +2635,7 @@ fn (p mut Parser) map_init() string {
p.gen('new_map_init($i, sizeof($val_type), ' + p.gen('new_map_init($i, sizeof($val_type), ' +
'(string[]){ $keys_gen }, ($val_type []){ $vals_gen } )') '(string[]){ $keys_gen }, ($val_type []){ $vals_gen } )')
typ := 'map_$val_type' typ := 'map_$val_type'
p.register_map(typ)
return typ return typ
} }
p.next() p.next()