Files
kotlin-fork/compiler/testData/codegen/box/regressions/lambdaPostponeConstruction.kt
T
2018-06-28 12:26:41 +02:00

15 lines
276 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
class MyList<T>
operator fun <T> MyList<T>.plusAssign(element: T) {}
val listOfFunctions = MyList<(Int) -> Int>()
fun foo() {
listOfFunctions.plusAssign({ it -> it })
listOfFunctions += { it -> it }
}
fun box(): String {
return "OK"
}