mirror of
https://github.com/vlang/v.git
synced 2025-09-09 07:15:50 -04:00
This commit is contained in:
parent
ee95e23ab6
commit
ee745113bd
@ -2629,6 +2629,7 @@ pub fn (mut f Fmt) map_init(node ast.MapInit) {
|
|||||||
sym := f.table.sym(node.typ)
|
sym := f.table.sym(node.typ)
|
||||||
info := sym.info as ast.Map
|
info := sym.info as ast.Map
|
||||||
f.mark_types_import_as_used(info.key_type)
|
f.mark_types_import_as_used(info.key_type)
|
||||||
|
f.mark_types_import_as_used(info.value_type)
|
||||||
f.write(f.table.type_to_str_using_aliases(node.typ, f.mod2alias))
|
f.write(f.table.type_to_str_using_aliases(node.typ, f.mod2alias))
|
||||||
}
|
}
|
||||||
if node.pos.line_nr == node.pos.last_line {
|
if node.pos.line_nr == node.pos.last_line {
|
||||||
|
5
vlib/v/fmt/tests/import_selective_map_keep.vv
Normal file
5
vlib/v/fmt/tests/import_selective_map_keep.vv
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import time { Duration }
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println(map[string]Duration{})
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user