Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWhenOpenGetterWithOverloading.kt
T
Dmitriy Novozhilov 796f8e6bce Revert "FIR checkers: report SMARTCAST_IMPOSSIBLE"
This reverts commit 84334b08
2021-06-03 09:48:50 +03:00

15 lines
286 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
interface Ctx
class CtxImpl : Ctx {
fun doJob(a: Int) {}
fun doJob(s: String) {}
}
open class Test(open val ctx: Ctx) {
fun test() {
when (ctx) {
is CtxImpl -> <!SMARTCAST_IMPOSSIBLE!>ctx<!>.doJob(2)
}
}
}