While this works perfectly fine: ``` fun bar(x: In...
# announcements
a
While this works perfectly fine:
Copy code
fun bar(x: Int): Int = when (x) {
    0 -> {
        listOf(1).forEach { return 0 }
        error("never")
    }
    else -> 10
}
a
I think the second version is actually a bug. The first compilation error is fine IMO
a
Okay, I will try to create an issue, see what devs have to say.
👍 1