Files
kotlin/compiler/testData/codegen/bytecodeText/defaultArguments/noEmptyArray.kt
2019-08-13 14:24:55 +02:00

7 lines
244 B
Kotlin
Vendored

// There is one ANEWARRAY instruction here, to generate the default parameter value.
fun default(vararg s: String = arrayOf("OK")) = s[0]
// This call on the other hand shouldn't allocate anything.
fun callDefault() = default()
// 1 ANEWARRAY