blob: 441b9f726c2bf48fe0c1dbf60d46b68d4cef7102 [file]
// LANGUAGE: +NameBasedDestructuring +DeprecateNameMismatchInShortDestructuringWithParentheses +EnableNameBasedDestructuringShortForm
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"
}