blob: b5ae425a22d7cdad2ba5438a01765103cf4cfb59 [file]
// LANGUAGE: +NameBasedDestructuring +DeprecateNameMismatchInShortDestructuringWithParentheses +EnableNameBasedDestructuringShortForm
// FIR_IDENTICAL
// RUN_PIPELINE_TILL: FRONTEND
class A {
operator fun component1() : Int = 1
operator fun component2() : Int = 2
}
fun a() {
val [<!REDECLARATION!>a<!>, <!REDECLARATION!>a<!>] = A()
val [x, <!REDECLARATION!>y<!>] = A();
val <!REDECLARATION!>b<!> = 1
use(b)
val [<!REDECLARATION!>b<!>, <!REDECLARATION!>y<!>] = A();
}
fun use(a: Any): Any = a
/* GENERATED_FIR_TAGS: classDeclaration, destructuringDeclaration, functionDeclaration, integerLiteral, localProperty,
operator, propertyDeclaration */