Let's say I have the following interfaces:
interface A
interface B
interface C
I want to create class with multiple upper bounds for types A and B:
class First<T>(val t: T) where T : A, T : B
I also want to use delegation for type C:
class Second(val c: C) : C by c
My question is how do I combine both in one class declaration ?
I tried this:
class Third<T>(val t: T, val c: C) where T : A, T : B, C by c // syntax error: "Expecting : before the upper bound"
And this:
class Third<T>(val t: T, val c: C) : C by c where T : A, T : B // unresolved reference where