<@U282LGMGR> I think a factory function is the clo...
# announcements
m
@redrield I think a factory function is the closest you can get:
Copy code
interface Foo
class Bar(val param1: Int, val param2: Int) : Foo
class Thing private constructor(val bar: Bar) : Foo by bar {
    companion object {
        fun thing(param1: Int, param2: Int) = Thing(Bar(param1, param2))
    }
}