Files
kotlin/compiler/testData/codegen/box/destructuringDeclInLambdaParam/underscoreNames.kt
2018-08-09 14:22:50 +03:00

10 lines
258 B
Kotlin
Vendored

class A {
operator fun component1() = "O"
operator fun component2(): String = throw RuntimeException("fail 0")
operator fun component3() = "K"
}
fun foo(a: A, block: (A) -> String): String = block(a)
fun box() = foo(A()) { (x, _, y) -> x + y }