Dominaezzz
05/19/2020, 5:17 PMe: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'usingConnection' into
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.
// Breaks compiler
val value: String
withContext(...) {
value = loadFromDb()
}
println(value)
// Doesn't break
val value: String = withContext(...) {
loadFromDb()
}
println(value)
Dominaezzz
05/19/2020, 5:20 PMDominaezzz
05/19/2020, 5:21 PM