Replace global mutable object with global variable
This commit is contained in:
@@ -77,7 +77,7 @@ fun createTextForHelpers(isReleaseCoroutines: Boolean, checkStateMachine: Boolea
|
|||||||
""
|
""
|
||||||
|
|
||||||
val checkStateMachineString = """
|
val checkStateMachineString = """
|
||||||
object StateMachineChecker {
|
class StateMachineCheckerClass {
|
||||||
private var counter = 0
|
private var counter = 0
|
||||||
var finished = false
|
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")
|
if (!finished) error("Wrong state-machine generated: it is not finished yet")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
val StateMachineChecker = StateMachineCheckerClass()
|
||||||
object CheckStateMachineContinuation: ContinuationAdapter<Unit>() {
|
object CheckStateMachineContinuation: ContinuationAdapter<Unit>() {
|
||||||
override val context: CoroutineContext
|
override val context: CoroutineContext
|
||||||
get() = EmptyCoroutineContext
|
get() = EmptyCoroutineContext
|
||||||
|
|||||||
Reference in New Issue
Block a user