Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt
T

17 lines
261 B
Kotlin
Vendored

// KT-338 Support.smartcasts in nested declarations
fun f(a: Any?) {
if (a is B) {
class C : X(<!DEBUG_INFO_SMARTCAST!>a<!>) {
init {
<!DEBUG_INFO_SMARTCAST!>a<!>.foo()
}
}
}
}
interface B {
fun foo() {}
}
open class X(b: B)