1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: more interface fixes

This commit is contained in:
Alexander Medvednikov
2020-05-02 00:28:42 +02:00
parent 7038f59ca5
commit 2f64594ce0
3 changed files with 18 additions and 12 deletions

View File

@@ -490,7 +490,8 @@ pub fn (t &Table) check(got, expected Type) bool {
mut info := exp_type_sym.info as Interface
// println('gen_types before')
// println(info.gen_types)
if got_type_sym.name !in info.gen_types {
if got_type_sym.name !in info.gen_types && got_type_sym.kind != .interface_ {
// TODO `got` should never be an interface?
info.gen_types << got_type_sym.name
}
// println('adding gen_type $got_type_sym.name')