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

18 lines
261 B
Kotlin

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