From 95f4115a102b48c47f3db0dae04bd13101a98c9a Mon Sep 17 00:00:00 2001 From: Ilmir Usmanov Date: Mon, 25 Mar 2019 09:07:32 +0300 Subject: [PATCH] Replace global mutable object with global variable --- .../tests/org/jetbrains/kotlin/coroutineTestUtil.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/coroutineTestUtil.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/coroutineTestUtil.kt index 3371c25fb7c..b6e79950dba 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/coroutineTestUtil.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/coroutineTestUtil.kt @@ -77,7 +77,7 @@ fun createTextForHelpers(isReleaseCoroutines: Boolean, checkStateMachine: Boolea "" val checkStateMachineString = """ - object StateMachineChecker { + class StateMachineCheckerClass { private var counter = 0 var finished = false @@ -106,6 +106,7 @@ fun createTextForHelpers(isReleaseCoroutines: Boolean, checkStateMachine: Boolea if (!finished) error("Wrong state-machine generated: it is not finished yet") } } + val StateMachineChecker = StateMachineCheckerClass() object CheckStateMachineContinuation: ContinuationAdapter() { override val context: CoroutineContext get() = EmptyCoroutineContext