Alex
05/16/2019, 5:20 PMinterface A
interface B
class ABImpl(concreteA: A): A by concreteA, B
now say I want a composite interface instead that encapsulates A & B
interface ABComposite: A, B
Then my ABImpl becomes
class ABImpl: ABComposite
If I want to delegate A only, but not B
my solution was to do
class ABImpl(concreteA: A): ABComposite, A by concreteA
Is that the correct way? It just looks slightly odd, but if that’s how you do it all good 🙂Dico
05/16/2019, 11:25 PMmarcinmoskala
05/17/2019, 8:15 AMinterface A
interface B
class ConcreteAB: A, B
class C(concreteAB: ConcreteAB): A by concreteAB, B by concreteAB