K2 Scripting: support script top-level destructuring declarations
This commit is contained in:
committed by
Space Team
parent
02e2438d37
commit
bf3a6f7678
@@ -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
|
||||
Reference in New Issue
Block a user