Files
kotlin-fork/compiler/testData/diagnostics/tests/when/PropertyNotInitialized.kt
T

16 lines
298 B
Kotlin
Vendored

// See KT-5113
enum class E {
A,
B
}
class Outer(e: E) {
private val prop: Int
init {
<!DEBUG_INFO_IMPLICIT_EXHAUSTIVE!>when(e ) {
// When is exhaustive, property is always initialized
E.A -> prop = 1
E.B -> prop = 2
}<!>
}
}