573188bdc4
Currently FirThisReceiverExpression of instance methods are translated to references of the class' thisReceiver, not the method's dispatch receiver, which causes problems with IrFrameMap::typeOf, as the class' thisReceiver is not in the typeMap. This commit translates non-qualified "this" references of instance methods to references of the methods' dispatch receiver.
18 lines
376 B
Kotlin
Vendored
18 lines
376 B
Kotlin
Vendored
fun box(): String {
|
|
abstract class L1 {
|
|
abstract fun foo(): String
|
|
}
|
|
|
|
open class L2(val s: String) : L1() {
|
|
override fun foo() = s
|
|
}
|
|
|
|
open class L3(unused: Double, value: String = "OK") : L2(value)
|
|
|
|
open class L4(i: Int, j: Long, z: Boolean, l: L3) : L3(3.14)
|
|
|
|
class L5 : L4(0, 0L, false, L3(2.71, "Fail"))
|
|
|
|
return L5().foo()
|
|
}
|