From 7ab2f1493c32be02ac6137caed4e9cfe229e112c Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Fri, 24 Jun 2022 06:47:47 +0300 Subject: [PATCH] Add error() function to interpreter test helper sources To compile standard library code that uses error() --- compiler/testData/ir/interpreter/helpers/Standard.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/testData/ir/interpreter/helpers/Standard.kt b/compiler/testData/ir/interpreter/helpers/Standard.kt index 2912dac6677..b6848f099b1 100644 --- a/compiler/testData/ir/interpreter/helpers/Standard.kt +++ b/compiler/testData/ir/interpreter/helpers/Standard.kt @@ -41,3 +41,5 @@ public inline fun repeat(times: Int, action: (Int) -> Unit) { action(index) } } + +public inline fun error(message: Any): Nothing = throw IllegalStateException(message.toString())