mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
25 lines
442 B
Kotlin
Vendored
25 lines
442 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
|
|
// FILE: utils.kt
|
|
|
|
inline class UInt(val u: Int)
|
|
|
|
// FILE: test.kt
|
|
|
|
fun <T> takeVarargs(vararg e: T) {}
|
|
|
|
fun test(u1: UInt, u2: UInt, us: Array<UInt>) {
|
|
takeVarargs(*us) // copy + checkcast
|
|
takeVarargs(u1, u2, *us) // 2 box + ...
|
|
}
|
|
|
|
// @TestKt.class:
|
|
// 2 INVOKESTATIC UInt\$Erased.box
|
|
// 0 INVOKEVIRTUAL UInt.unbox
|
|
|
|
// 2 CHECKCAST \[LUInt
|
|
|
|
// 0 CHECKCAST \[Ljava/lang/Integer
|
|
|
|
// 0 intValue
|
|
// 0 valueOf |