9c7058c3c5
^KT-49747 Fixed
22 lines
397 B
Kotlin
Vendored
22 lines
397 B
Kotlin
Vendored
// ISSUE: KT-49747
|
|
// DUMP_CFG
|
|
|
|
class A(val path: String?, val index: Int)
|
|
|
|
interface Base
|
|
class Derived(val index: Int) : Base
|
|
|
|
fun test(a: A?): Base? {
|
|
val path = a?.path ?: return null
|
|
takeInt(a.index) // should be ok
|
|
return object : Base by Derived(a.index) {
|
|
val x: Int = a.index
|
|
|
|
fun foo() {
|
|
takeInt(a.index)
|
|
}
|
|
}
|
|
}
|
|
|
|
fun takeInt(x: Int) {}
|