mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
table: interfaces: unique gen_types
This commit is contained in:
parent
473617f061
commit
20013e4b4b
@ -490,7 +490,9 @@ pub fn (t &Table) check(got, expected Type) bool {
|
|||||||
mut info := exp_type_sym.info as Interface
|
mut info := exp_type_sym.info as Interface
|
||||||
// println('gen_types before')
|
// println('gen_types before')
|
||||||
// println(info.gen_types)
|
// println(info.gen_types)
|
||||||
|
if got_type_sym.name !in info.gen_types {
|
||||||
info.gen_types << got_type_sym.name
|
info.gen_types << got_type_sym.name
|
||||||
|
}
|
||||||
// println('adding gen_type $got_type_sym.name')
|
// println('adding gen_type $got_type_sym.name')
|
||||||
// println(info.gen_types)
|
// println(info.gen_types)
|
||||||
return true
|
return true
|
||||||
|
@ -46,6 +46,7 @@ fn test_perform_speak() {
|
|||||||
perform_speak(dog)
|
perform_speak(dog)
|
||||||
cat := Cat{}
|
cat := Cat{}
|
||||||
perform_speak(cat)
|
perform_speak(cat)
|
||||||
|
perform_speak(Cat{})
|
||||||
perform_speakers([dog, cat])
|
perform_speakers([dog, cat])
|
||||||
/*
|
/*
|
||||||
f := Foo {
|
f := Foo {
|
||||||
|
Loading…
Reference in New Issue
Block a user