[FIR] Add top level invalid destructuring declarations in classes

Part of ^KTIJ-23263

Merge-request: KT-MR-10424
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
This commit is contained in:
Egor Kulikov
2023-06-02 14:05:00 +00:00
committed by Space Team
parent 1dee01474c
commit 8ae5336f04
13 changed files with 67 additions and 2 deletions
@@ -0,0 +1,3 @@
class A {
val (a, b) = 1 to 2
}
@@ -0,0 +1,9 @@
FILE: invalidDestructing.kt
public? final? class A : R|kotlin/Any| {
public? constructor(): R|A| {
LAZY_super<R|kotlin/Any|>
}
<ERROR PROPERTY: Destructuring declarations are only allowed for local variables/values>
}
@@ -0,0 +1,9 @@
FILE: invalidDestructing.kt
public? final? class A : R|kotlin/Any| {
public? [ContainingClassKey=A] constructor(): R|A| {
super<R|kotlin/Any|>()
}
<ERROR PROPERTY: Destructuring declarations are only allowed for local variables/values>
}