[LL API] return FirErrorProperty for top level destructuring declaration

KTIJ-23552
This commit is contained in:
Anna Kozlova
2022-11-10 15:07:39 +01:00
parent 3590c4ea35
commit 9f470e2a4d
17 changed files with 76 additions and 12 deletions
@@ -0,0 +1,6 @@
// WITH_STDLIB
var a = -1
var b = 0
val pair = Pair(a, b)
val (first, last) = <expr>pair</expr>
@@ -0,0 +1,6 @@
KT element: KtNameReferenceExpression
FIR element: FirErrorPropertyImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
<ERROR TYPE REF: Destructuring declarations are only allowed for local variables/values>