https://kotlinlang.org logo
Title
e

Exerosis

01/08/2022, 8:02 PM
This works perfectly fine! However if I change it to this:
var cancel = false
var i = 0
this.forEach {
    val result = !it(using, interaction)
    println("${i++} cancelled = $result")
    if (result) {
        println("cancelling")
        return
    }
}
It prints out 4 times DOES NOT print cancelling... and then it just stops.
e

ephemient

01/08/2022, 9:41 PM
sounds like output buffering, not a compiler issue
e

Exerosis

01/11/2022, 11:20 PM
I thought so as well, but I've tried manually flushing output stream. Also, I was writing a full stack trace at one point which doesn't have a shot of being fully buffered.