mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: keep module alias in interfaces (#9985)
This commit is contained in:
parent
597a774d36
commit
5b826b2663
@ -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)
|
||||
}
|
||||
|
@ -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{}
|
||||
|
Loading…
Reference in New Issue
Block a user