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

15 lines
238 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
class A {
operator fun component1() = 1
operator fun component2() = 2
}
fun box() : String {
val (a, b) = A()
val run = {
a
}
return if (run() == 1 && b == 2) "OK" else "fail"
}