Files
kotlin-fork/compiler/testData/ir/irText/expressions/lambdaInCAO.kt
T
Dmitry Petrov c2601c947f Postpone call arguments generation in compound assignment expressions
Otherwise RHS is generated twice, causing ISE in symbol binding
2017-05-05 09:59:30 +03:00

16 lines
267 B
Kotlin
Vendored

operator fun Any.plusAssign(lambda: () -> Unit) {}
operator fun Any.get(index: () -> Unit): Int = 42
operator fun Any.set(index: () -> Unit, value: Int) {}
fun test1(a: Any) {
a += { }
}
fun test2(a: Any) {
a[{}] += 42
}
fun test3(a: Any) {
a[{}]++
}