Interfaces
interface Foo {
fun foo(): int;
fun fooDefault(): int { // default function that can be overrided
return -1;
}
}
struct Bar: Foo {
fun foo(): int {
return 0;
}
fun fooDefault(): int {
return foo();
}
}Last updated