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

16 lines
252 B
Kotlin
Vendored

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