Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/sealedClass.kt
T
2020-12-16 19:52:30 +03:00

11 lines
376 B
Kotlin
Vendored

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