[FIR] Support fields as part of graph of class initialization
^KT-49747 Fixed
This commit is contained in:
committed by
teamcityserver
parent
5778cb440f
commit
9c7058c3c5
+21
@@ -0,0 +1,21 @@
|
||||
// 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) {}
|
||||
Reference in New Issue
Block a user