Files
kotlin-fork/compiler/testData/ir/irText/expressions/kt30020.kt
T
Sergej Jaskiewicz f2031ae642 [IR] Don't print multifile/synthetic facade class names in irText tests
This only applies to JVM and fq-names in declaration references
in IR dumps.

This enables us to run more irText tests on platforms other than JVM
(see KT-58605).
2023-06-05 10:40:17 +00:00

34 lines
601 B
Kotlin
Vendored

// WITH_STDLIB
// IGNORE_BACKEND_K2: JS_IR
// ^ the order of fake overrides is different on K2
interface X {
val xs: MutableList<Any>
fun f(): MutableList<Any>
}
fun test(x: X, nx: X?) {
x.xs += 1
x.f() += 2
(x.xs as MutableList<Int>) += 3
(x.f() as MutableList<Int>) += 4
nx?.xs!! += 5
nx?.f()!! += 6
}
fun MutableList<Any>.testExtensionReceiver() {
this += 100
}
abstract class AML : MutableList<Int> {
fun testExplicitThis() {
this += 200
}
inner class Inner {
fun testOuterThis() {
this@AML += 300
}
}
}