Files
kotlin/compiler/testData/codegen/box/multiDecl/ValCapturedInLocalFunction.kt
2019-11-19 11:00:09 +03:00

14 lines
253 B
Kotlin
Vendored

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