blob: c60f3fc94e01cf88198a17d91d772bdab164ad31 [file]
// LANGUAGE: +NameBasedDestructuring +DeprecateNameMismatchInShortDestructuringWithParentheses +EnableNameBasedDestructuringShortForm
// RUN_PIPELINE_TILL: CODEGEN
class A {
operator fun component1() = "O"
operator fun component2() = "K"
}
class Foo {
val bar =
if (true) ""
else {
val [o, k] = A()
o + k
}
init {
val [o, k] = A()
val r = o + k
}
}
/* GENERATED_FIR_TAGS: additiveExpression, classDeclaration, destructuringDeclaration, functionDeclaration, ifExpression,
init, localProperty, operator, propertyDeclaration, stringLiteral */