Files
kotlin-fork/compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAnyCase.fir.kt
T

16 lines
267 B
Kotlin
Vendored

sealed class Sealed {
object First: Sealed()
open class NonFirst: Sealed() {
object Second: NonFirst()
object Third: NonFirst()
}
}
fun foo(s: Sealed): Int {
return when(s) {
is Sealed.First -> 1
!is Any -> 0
}
}