JS: inline componentN functions

#KT-7294 fixed
This commit is contained in:
Alexey Tsvetkov
2015-04-14 18:02:44 +03:00
parent a9d38e8d22
commit 97a1a13235
6 changed files with 40 additions and 9 deletions
@@ -0,0 +1,17 @@
package foo
// CHECK_NOT_CALLED: component1
// CHECK_NOT_CALLED: component2
class A(val a: Int, val b: Int)
inline fun A.component1(): Int = a
inline fun A.component2(): Int = b
fun box(): String {
val (a, b) = A(1, 2)
assertEquals(1, a)
assertEquals(2, b)
return "OK"
}