Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/MultiDeclaration.kt
T
Evgeniy.Zhelenskiy 5258e2044d [FIR] Forbid annotations on anonymous initializers and destructuring declarations
#KT-59896


Merge-request: KT-MR-13197
Merged-by: Evgeniy Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>
2023-11-28 11:59:26 +00:00

10 lines
250 B
Kotlin
Vendored

// FIR_IDENTICAL
annotation class Ann
data class Pair(val x: Int, val y: Int)
fun foo(): Int {
<!WRONG_ANNOTATION_TARGET!>@Ann<!> val (a, b) = Pair(12, 34)
@<!UNRESOLVED_REFERENCE!>Err<!> val (c, d) = Pair(56, 78)
return a + b + c + d
}