mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
16 lines
274 B
Kotlin
16 lines
274 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(<!UNUSED_PARAMETER!>b<!>: B) |