mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: minor cleanup in auto_str_methods.v (#16411)
This commit is contained in:
parent
f31a3b4250
commit
5a28699edb
@ -80,12 +80,11 @@ fn (mut g Gen) get_str_fn(typ ast.Type) string {
|
||||
}
|
||||
}
|
||||
if sym.has_method_with_generic_parent('str') {
|
||||
if mut sym.info is ast.Struct {
|
||||
str_fn_name = g.generic_fn_name(sym.info.concrete_types, str_fn_name)
|
||||
} else if mut sym.info is ast.SumType {
|
||||
str_fn_name = g.generic_fn_name(sym.info.concrete_types, str_fn_name)
|
||||
} else if mut sym.info is ast.Interface {
|
||||
str_fn_name = g.generic_fn_name(sym.info.concrete_types, str_fn_name)
|
||||
match mut sym.info {
|
||||
ast.Struct, ast.SumType, ast.Interface {
|
||||
str_fn_name = g.generic_fn_name(sym.info.concrete_types, str_fn_name)
|
||||
}
|
||||
else {}
|
||||
}
|
||||
}
|
||||
g.str_types << StrType{
|
||||
|
Loading…
Reference in New Issue
Block a user