// WITH_STDLIB // IGNORE_BACKEND_K1: JS_IR, JS_IR_ES6 // IGNORE_BACKEND_K2: JS_IR, JS_IR_ES6 // ^ MutableList has js specific methods interface X { val xs: MutableList fun f(): MutableList } fun test(x: X, nx: X?) { x.xs += 1 x.f() += 2 (x.xs as MutableList) += 3 (x.f() as MutableList) += 4 nx?.xs!! += 5 nx?.f()!! += 6 } fun MutableList.testExtensionReceiver() { this += 100 } abstract class AML : MutableList { fun testExplicitThis() { this += 200 } inner class Inner { fun testOuterThis() { this@AML += 300 } } }