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 sym.has_method_with_generic_parent('str') {
|
||||||
if mut sym.info is ast.Struct {
|
match mut sym.info {
|
||||||
str_fn_name = g.generic_fn_name(sym.info.concrete_types, str_fn_name)
|
ast.Struct, ast.SumType, ast.Interface {
|
||||||
} else if mut sym.info is ast.SumType {
|
str_fn_name = g.generic_fn_name(sym.info.concrete_types, str_fn_name)
|
||||||
str_fn_name = g.generic_fn_name(sym.info.concrete_types, str_fn_name)
|
}
|
||||||
} else if mut sym.info is ast.Interface {
|
else {}
|
||||||
str_fn_name = g.generic_fn_name(sym.info.concrete_types, str_fn_name)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g.str_types << StrType{
|
g.str_types << StrType{
|
||||||
|
Loading…
Reference in New Issue
Block a user