From afe6ec92a4758f6f88bd140ffb539a8ecd3c3c20 Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Thu, 3 Nov 2016 22:58:26 +0300 Subject: [PATCH] Break infinity loop in the test --- .../testData/codegen/box/functions/localFunctions/kt4989.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/testData/codegen/box/functions/localFunctions/kt4989.kt b/compiler/testData/codegen/box/functions/localFunctions/kt4989.kt index 90ed88dce00..d42b8a0b6b0 100644 --- a/compiler/testData/codegen/box/functions/localFunctions/kt4989.kt +++ b/compiler/testData/codegen/box/functions/localFunctions/kt4989.kt @@ -13,12 +13,16 @@ fun box(): String { var counter: Int? = null fun path(metaRunnerId: String) = counter != 2 + var i = 0 while (true) { val name = projectId + "_" + it.id + (if (counter == null) "" else "_$counter") if (!path(name)) { return name } counter++ + + i++ + if (i > 2) return "Infinity loop: $counter" } } val X = selectMetaRunnerId()