I don’t think there’s a clean solution to this in Kotlin. One thing that can be done is:
private object Foo
class C(p: Foo) : I1, I2 { ... }
Nobody can call C()
from the outside, because Foo
is private to this file
I don’t think there’s a clean solution to this in Kotlin. One thing that can be done is:
private object Foo
class C(p: Foo) : I1, I2 { ... }
Nobody can call C()
from the outside, because Foo
is private to this file