KT-13941 related: "Simplify using destructuring declaration" is now applicable for function literals without parameter specification
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user