diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/TestCase.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/TestCase.kt index 60dd9c7ef95..9f73073eb2c 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/TestCase.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/blackboxtest/TestCase.kt @@ -46,13 +46,13 @@ internal class TestFile private constructor( // An optimization to release the memory occupied by numerous file texts. fun commit() { - state = when (val state = state) { + when (val state = state) { is State.Uncommitted -> { location.parentFile.mkdirs() location.writeText(state.text) - State.Committed + this.state = State.Committed } - is State.Committed -> state + is State.Committed -> System.err.println("$this has been committed again. Need to check why this had happened.") } }