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

12 lines
169 B
Kotlin
Vendored

class A
fun test(a: Any): String {
val q: String? = null
when (a) {
is A -> q!!
}
// When is not exhaustive
return <!TYPE_MISMATCH!>q<!>
}