From 1ea9c2d4bad702b48349fcca2d3b8cd633a7af43 Mon Sep 17 00:00:00 2001 From: Pavel Punegov Date: Thu, 16 Aug 2018 17:17:06 +0300 Subject: [PATCH] Replace min with coerceAtMost in test --- .../forInArray/forInArraySpecializedToUntil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt b/compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt index 0c0bf70956e..a12b209f557 100644 --- a/compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt +++ b/compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt @@ -129,7 +129,7 @@ fun checkIntArrayMethodCallBound(): Boolean { val intArray = intArrayOf(1, 2, 3) var start = 0 var sum = 0 - for (i in 0..kotlin.math.min(intArray.size, 10) - 1) { + for (i in 0..intArray.size.coerceAtMost(10) - 1) { sum += intArray[i] } if (sum != 6) return false