diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index dc94e7fc41..c051b9f921 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -1191,9 +1191,6 @@ pub fn (mut f Fmt) interface_decl(node ast.InterfaceDecl) { } // TODO: alignment, comments, etc. mut ft := f.no_cur_mod(f.table.type_to_str_using_aliases(field.typ, f.mod2alias)) - if !ft.contains('C.') && !ft.contains('JS.') && !ft.contains('fn (') { - ft = f.short_module(ft) - } f.writeln('\t$field.name $ft') f.mark_types_import_as_used(field.typ) } diff --git a/vlib/v/fmt/tests/module_alias_keep.vv b/vlib/v/fmt/tests/module_alias_keep.vv index 6057d39ad5..f35e6d0fa5 100644 --- a/vlib/v/fmt/tests/module_alias_keep.vv +++ b/vlib/v/fmt/tests/module_alias_keep.vv @@ -1,5 +1,14 @@ import time import semver as sv +import term.ui as tui + +interface Inter { + code tui.KeyCode +} + +struct TuiStruct { + code tui.KeyCode +} fn foo(f time.Time) time.Time { f2 := time.Time{}