Files
kotlin/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt
2014-10-01 18:52:52 +04:00

16 lines
251 B
Kotlin

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