KT-13941 related: "Simplify using destructuring declaration" is now applicable for function literals without parameter specification

This commit is contained in:
Mikhail Glukhikh
2016-10-03 14:36:25 +03:00
parent df0cf3da84
commit 48437d5965
7 changed files with 121 additions and 27 deletions
@@ -0,0 +1,11 @@
// WITH_RUNTIME
data class XY(val x: String, val y: String)
fun convert(xy: XY, foo: (XY) -> Unit) = foo(xy)
fun foo(xy: XY) = convert(xy) <caret>{
val x = it.x
val y = it.y
println(x + y)
}