Files
kotlin-fork/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.kt
T
Dmitry Petrov 3fa33b5969 Fix compound assignment on arbitrary expression in LHS
(with a convention compound assignment operator defined).
2016-10-18 09:09:17 +03:00

22 lines
228 B
Kotlin
Vendored

class Host {
operator fun plusAssign(x: Int) {}
fun test1() {
this += 1
}
}
fun foo() = Host()
fun Host.test2() {
this += 1
}
fun test3() {
foo() += 1
}
fun test4(a: () -> Host) {
a() += 1
}