Files
kotlin-fork/js/js.translator/testData/inlineEvaluationOrder/cases/multiDeclaration.kt
T
2015-04-16 21:17:11 +03:00

19 lines
313 B
Kotlin
Vendored

package foo
// CHECK_NOT_CALLED: component2
class A(val x: Int, val y: Int)
fun A.component1(): Int = fizz(x)
inline
fun A.component2(): Int = buzz(y)
fun box(): String {
val (a, b) = A(1, 2)
assertEquals(a, 1)
assertEquals(b, 2)
assertEquals("fizz(1);buzz(2);", pullLog())
return "OK"
}