Files
kotlin-fork/compiler/testData/ir/irText/expressions/kt30020.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

62 lines
1.3 KiB
Plaintext
Vendored

interface X {
abstract val xs: MutableList<Any>
abstract get
abstract fun f(): MutableList<Any>
}
fun test(x: X, nx: X?) {
{ // BLOCK
val tmp0_this: X = x
tmp0_this.<get-xs>().plusAssign<Int>(element = 1)
}
x.f().plusAssign<Int>(element = 2)
x.<get-xs>() as MutableList<Int>.plusAssign<Int>(element = 3)
x.f() as MutableList<Int>.plusAssign<Int>(element = 4)
CHECK_NOT_NULL<MutableList<Any>>(arg0 = { // BLOCK
val tmp1_safe_receiver: X? = nx
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> tmp1_safe_receiver.<get-xs>()
}
}).plusAssign<Int>(element = 5)
CHECK_NOT_NULL<MutableList<Any>>(arg0 = { // BLOCK
val tmp2_safe_receiver: X? = nx
when {
EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null
else -> tmp2_safe_receiver.f()
}
}).plusAssign<Int>(element = 6)
}
fun MutableList<Any>.testExtensionReceiver() {
<this>.plusAssign<Int>(element = 100)
}
abstract class AML : MutableList<Int> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
fun testExplicitThis() {
<this>.plusAssign<Int>(element = 200)
}
inner class Inner {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
fun testOuterThis() {
<this>.plusAssign<Int>(element = 300)
}
}
}