ast: cleanup in find_method_with_generic_parent() (#13600)
parent
d80f5165dd
commit
0d9792bdf2
|
@ -1267,7 +1267,7 @@ pub fn (t &TypeSymbol) find_method_with_generic_parent(name string) ?Fn {
|
||||||
mut method := x
|
mut method := x
|
||||||
generic_names := parent_sym.info.generic_types.map(table.sym(it).name)
|
generic_names := parent_sym.info.generic_types.map(table.sym(it).name)
|
||||||
return_sym := table.sym(method.return_type)
|
return_sym := table.sym(method.return_type)
|
||||||
if return_sym.kind == .struct_ {
|
if return_sym.kind in [.struct_, .interface_, .sum_type] {
|
||||||
method.return_type = table.unwrap_generic_type(method.return_type,
|
method.return_type = table.unwrap_generic_type(method.return_type,
|
||||||
generic_names, t.info.concrete_types)
|
generic_names, t.info.concrete_types)
|
||||||
} else {
|
} else {
|
||||||
|
@ -1290,7 +1290,6 @@ pub fn (t &TypeSymbol) find_method_with_generic_parent(name string) ?Fn {
|
||||||
}
|
}
|
||||||
else {}
|
else {}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue