From d6ba233bbe7c4370aa676763c95c6acb75c31be1 Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Fri, 21 Jul 2023 16:37:38 +0200 Subject: [PATCH] Define `fail` in the test to pass on JVM and Native --- compiler/testData/codegen/box/when/kt60212.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/testData/codegen/box/when/kt60212.kt b/compiler/testData/codegen/box/when/kt60212.kt index d473ab668a0..299255a7511 100644 --- a/compiler/testData/codegen/box/when/kt60212.kt +++ b/compiler/testData/codegen/box/when/kt60212.kt @@ -30,3 +30,5 @@ fun test(b0: Int) = when { b0 and 0xf8 == 0xf0 -> 3 else -> -1 } + +fun fail(message: String): Nothing = throw Exception(message)