I have two interfaces, Foo
and Bar
, and I have a class Baz<T : Foo>
. I want to create a new class Buz<T>
that extends Baz
, where Buz
‘s type parameter extends both Foo
and Bar
. So it’d look something like this:
interface Foo
interface Bar
class Baz<T : Foo>
// doesn't work
class Buz<T> where T : Foo, T : Bar : Baz<T>
what’s the actual way of doing this in Kotlin?