v/vlib/v/checker/tests/unimplemented_interface_d.vv

14 lines
124 B
V

interface Animal {
speak(s string)
}
struct Cat {}
fn (c Cat) speak() {}
fn foo(a Animal) {}
fn main() {
foo(Cat{})
}