Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/exhaustiveness_sealedObject.kt
T
2020-03-19 09:51:01 +03:00

24 lines
303 B
Kotlin
Vendored

// ISSUE: KT-37488
sealed class A
class B : A()
object C : A()
fun takeString(s: String) {}
fun test_1(a: A) {
val s = when(a) {
is B -> ""
is C -> ""
}
takeString(s)
}
fun test_2(a: A) {
val s = when(a) {
is B -> ""
C -> ""
}
takeString(s)
}