diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index f742c5432ad..c14a2aaed28 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -2228,6 +2228,12 @@ task serialized_doWhile(type: LinkKonanTest) { goldValue = "999\n" } +task serialized_vararg(type: LinkKonanTest) { + source = "serialization/use.kt" + lib = "serialization/vararg.kt" + goldValue = "17\n19\n23\n29\n31\nsize: 5\n" +} + task testing_annotations(type: RunStandaloneKonanTest) { source = "testing/annotations.kt" flags = ['-tr'] diff --git a/backend.native/tests/serialization/vararg.kt b/backend.native/tests/serialization/vararg.kt new file mode 100644 index 00000000000..655362bf541 --- /dev/null +++ b/backend.native/tests/serialization/vararg.kt @@ -0,0 +1,9 @@ +fun bar(vararg x: Int) { + x.forEach { + println(it) + } + println("size: ${x.size}") +} + +inline fun foo() = bar(17, 19, 23, *intArrayOf(29, 31)) +