blob: 77daf83a4968b92653dc900012d96567b9f8d395 [file]
// LANGUAGE: +NameBasedDestructuring +DeprecateNameMismatchInShortDestructuringWithParentheses +EnableNameBasedDestructuringShortForm
class A {
}
operator fun A.component1() = 1
operator fun A.component2() = 2
fun box() : String {
var [a, b] = A()
fun local() {
a = 3
}
local()
return if (a == 3 && b == 2) "OK" else "fail"
}