I can reproduce it in my project but I'm having trouble making a self-contained reproducer.
I would publish the project but the contents are personal/sensitive (My access tokens are hard coded).
What to do?
I fix the error when I stop taking advantage of contracts in suspend methods.
Copy code
// Breaks compiler
val value: String
withContext(...) {
value = loadFromDb()
}
println(value)
// Doesn't break
val value: String = withContext(...) {
loadFromDb()
}
println(value)