JVM BE: Add more tests for default arguments
- Inline class parameters should not be boxed. - Empty vararg parameters should not allocate an empty array.
This commit is contained in:
committed by
Georgy Bronnikov
parent
9d7de8e9ec
commit
79f71f61d5
@@ -0,0 +1,9 @@
|
||||
// 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
|
||||
Reference in New Issue
Block a user