FIR2IR: Fix mapping for intersection overrides of deserialized properties

This commit is contained in:
Denis.Zharkov
2021-01-22 11:44:30 +03:00
parent fdf0934ade
commit 3a3d2ee3e9
10 changed files with 68 additions and 4 deletions
@@ -0,0 +1,39 @@
// TARGET_BACKEND: JVM
// FILE: A.kt
package a
interface IrSymbol {
val owner: Any
}
interface IrFunction
interface IrSimpleFunction : IrFunction {
val name: String
}
interface IrFunctionSymbol : IrSymbol {
override val owner: IrFunction
}
interface IrBindableSymbol<B : Any> : IrSymbol {
override val owner: B
}
interface IrSimpleFunctionSymbol : IrFunctionSymbol, IrBindableSymbol<IrSimpleFunction>
// FILE: B.kt
import a.*
fun foo(x: IrSimpleFunctionSymbol): String {
return x.owner.name
}
fun box(): String {
return foo(object : IrSimpleFunctionSymbol {
override val owner: IrSimpleFunction
get() = object : IrSimpleFunction {
override val name: String
get() = "OK"
}
})
}