sealed class Foo(val value: String) class Bar : Foo("OK") sealed class WithPrivateConstructor private constructor(val x: Int) { private constructor() : this(42) } object First : WithPrivateConstructor() // error object Second : WithPrivateConstructor(0) // error