K2 Scripting: support script top-level destructuring declarations

This commit is contained in:
Ilya Chernikov
2023-05-25 17:05:32 +02:00
committed by Space Team
parent 02e2438d37
commit bf3a6f7678
16 changed files with 199 additions and 15 deletions
@@ -0,0 +1,16 @@
val (a, b) = A()
val (c, d) = B()
val rv = (a + b) * (c + d)
class A {
operator fun component1() = 1
operator fun component2() = 5
}
class B {
operator fun component1() = 3
operator fun component2() = 4
}
// expected: rv: 42