Files
kotlin-fork/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.fir.kt
T
Denis Zharkov d869ae7826 FIR: Make resolution logic for local classes the same as for top-level
Run different phases through common transformers sequentially
It should make code more reusable and may help with avoid common bugs
2020-03-25 15:36:17 +03:00

17 lines
207 B
Kotlin
Vendored

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