diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 2185ab191d6..7b54c0e32d0 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -502,6 +502,17 @@ task boxing13(type: RunKonanTest) { source = "codegen/boxing/boxing13.kt" } +task boxing14(type: RunKonanTest) { + goldValue = "42\n" + source = "codegen/boxing/boxing14.kt" +} + +task boxing15(type: RunKonanTest) { + disabled = true + goldValue = "17\n" + source = "codegen/boxing/boxing15.kt" +} + task interface0(type: RunKonanTest) { goldValue = "PASSED\n" source = "runtime/basic/interface0.kt" diff --git a/backend.native/tests/codegen/boxing/boxing14.kt b/backend.native/tests/codegen/boxing/boxing14.kt new file mode 100644 index 00000000000..0cf6ae3ff59 --- /dev/null +++ b/backend.native/tests/codegen/boxing/boxing14.kt @@ -0,0 +1,5 @@ +fun main(args: Array) { + 42.println() +} + +fun T.println() = println(this.toString()) \ No newline at end of file diff --git a/backend.native/tests/codegen/boxing/boxing15.kt b/backend.native/tests/codegen/boxing/boxing15.kt new file mode 100644 index 00000000000..f9a27c90931 --- /dev/null +++ b/backend.native/tests/codegen/boxing/boxing15.kt @@ -0,0 +1,5 @@ +fun main(args: Array) { + println(foo(17)) +} + +fun foo(x: T): Int = x \ No newline at end of file