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