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:
parent
857cf00caf
commit
f34d14d901
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user