<@U4SS0FGM9> one current “workaround” to this is t...
# language-proposals
a
@ske one current “workaround” to this is to use a private constructor
Copy code
class Foo private constructor(private val barImpl: Bar): Bar by barImpl {
    constructor() : this(BarImpl())
}
a
Does
class Foo : Bar by BarImpl()
not work?
a
it might, I’d have to double check, however, this doesn’t work in more complex cases, such as BarImpl implementing multiple interfaces, or if I want to have access to the Bar instance.