mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix error of embedded struct generating interface_table (#12847)
This commit is contained in:
parent
fa1a7a85f0
commit
2ce1647ea0
@ -7338,7 +7338,12 @@ static inline $interface_name I_${cctype}_to_Interface_${interface_name}($cctype
|
|||||||
if st_sym.info is ast.Struct {
|
if st_sym.info is ast.Struct {
|
||||||
for embed in st_sym.info.embeds {
|
for embed in st_sym.info.embeds {
|
||||||
embed_sym := g.table.get_type_symbol(embed)
|
embed_sym := g.table.get_type_symbol(embed)
|
||||||
methods << embed_sym.methods
|
method_names := methods.map(it.name)
|
||||||
|
for embed_method in embed_sym.methods {
|
||||||
|
if embed_method.name !in method_names {
|
||||||
|
methods << embed_method
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for method in methods {
|
for method in methods {
|
||||||
|
Loading…
Reference in New Issue
Block a user