Support passing inline class values with spread operator
This commit is contained in:
compiler/testData/codegen/bytecodeText/inlineClasses/passInlineClassesWithSpreadOperatorToVarargs.kt
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class UInt(val u: Int)
|
||||
|
||||
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 + ...
|
||||
}
|
||||
|
||||
// 2 INVOKESTATIC UInt\$Erased.box
|
||||
// 0 INVOKEVIRTUAL UInt.unbox
|
||||
|
||||
// 2 CHECKCAST \[LUInt
|
||||
|
||||
// 0 CHECKCAST \[Ljava/lang/Integer
|
||||
|
||||
// 0 intValue
|
||||
// 0 valueOf
|
||||
Reference in New Issue
Block a user