Files
kotlin/compiler/testData/codegen/multiDecl/ValCapturedInFunctionLiteral.kt
2012-08-21 16:32:19 +04:00

14 lines
194 B
Kotlin

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