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