cgen: fix duplicate method wrapper from interface method call. closes #9018

pull/9057/head
Joe Conigliaro 2021-03-02 19:15:49 +11:00
parent 2b53992c01
commit 01735c67c6
No known key found for this signature in database
GPG Key ID: C12F7136C08206F1
1 changed files with 1 additions and 8 deletions

View File

@ -6222,14 +6222,7 @@ $staticprefix $interface_name* I_${cctype}_to_Interface_${interface_name}_ptr($c
if g.pref.build_mode != .build_module {
methods_struct.writeln('\t{')
}
mut method := table.Fn{}
for _, m in ityp.methods {
for mm in st_sym.methods {
if mm.name == m.name {
method = mm
break
}
}
for _, method in st_sym.methods {
if method.name !in imethods {
// a method that is not part of the interface should be just skipped
continue