Files
kotlin-fork/compiler/testData/codegen/box/smartCasts/propertyInitializationAfterSmartCast.kt
T
Kirill Rakhman 0e721c8fc2 [FIR2IR] Fix generation of val initialization after smart-cast
If neither setter nor backing field were found for an assignment call,
search overridden properties for backing fields.

^KT-57105 Fixed
2023-03-10 09:30:51 +00:00

17 lines
238 B
Kotlin
Vendored

// ISSUE: KT-57105
class RootBus: MessageBusImpl()
open class MessageBusImpl {
val parentBus: Any?
init {
this as RootBus
parentBus = "OK"
}
}
fun box(): String {
return RootBus().parentBus as String
}