Files
kotlin/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt
2015-05-12 19:43:17 +02:00

16 lines
283 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(<!UNUSED_PARAMETER!>b<!>: B)