mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
7 lines
244 B
Kotlin
Vendored
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 |