mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: fix import module { Foo }
(#14894)
This commit is contained in:
parent
92f441e894
commit
9f59dbd319
@ -178,7 +178,7 @@ pub fn (mut f Fmt) struct_init(node ast.StructInit) {
|
||||
defer {
|
||||
f.is_struct_init = struct_init_save
|
||||
}
|
||||
|
||||
f.mark_types_import_as_used(node.typ)
|
||||
type_sym := f.table.sym(node.typ)
|
||||
// f.write('<old name: $type_sym.name>')
|
||||
mut name := type_sym.name
|
||||
|
5
vlib/v/fmt/tests/import_with_symbol_of_struct_keep.vv
Normal file
5
vlib/v/fmt/tests/import_with_symbol_of_struct_keep.vv
Normal file
@ -0,0 +1,5 @@
|
||||
import datatypes { Stack }
|
||||
|
||||
fn main() {
|
||||
stack := Stack<int>{}
|
||||
}
|
Loading…
Reference in New Issue
Block a user