mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
- Inline class parameters should not be boxed. - Empty vararg parameters should not allocate an empty array.
9 lines
271 B
Kotlin
Vendored
9 lines
271 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
|
|
// 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 |