I'm getting the following after upgrading from kotlin 1.5.31 to 1.6.0... did anyone ever encounter something similar and can help me out here?
Copy code
java.lang.IllegalStateException: Symbol for kotlin.collections/mutableMapOf|-4813910536206556932[0] is unbound
at org.jetbrains.kotlin.ir.symbols.impl.IrBindablePublicSymbolBase.getOwner(IrPublicSymbolBase.kt:52)
...
n
nschulzke
12/15/2021, 10:24 PM
I'm seeing this right now. Have you had any luck resolving it?
nschulzke
12/15/2021, 10:41 PM
Are you using Jetpack Compose? This is the stacktrace I have:
Copy code
java.lang.IllegalStateException: Symbol for kotlin.collections/mutableMapOf|-4813910536206556932[0] is unbound
at org.jetbrains.kotlin.ir.symbols.impl.IrBindablePublicSymbolBase.getOwner(IrPublicSymbolBase.kt:52)
at org.jetbrains.kotlin.ir.symbols.impl.IrSimpleFunctionPublicSymbolImpl.getOwner(IrPublicSymbolBase.kt:74)
at androidx.compose.compiler.plugins.kotlin.lower.LiveLiteralTransformer.visitCall(LiveLiteralTransformer.kt:663)
...
nschulzke
12/16/2021, 12:06 AM
I fixed it by simplifying some code that looked like this:
Copy code
val x = mutableMapOf("something" to "something").apply {
if (bool) {
put("another", "thing")
}
}
To this:
Copy code
val x = mutableMapOf()
x["something"] = "something"
if (bool) {
x["another"] = "thing"
}
If I were you I'd check all your uses of
mutableMapOf
, particularly in places that are nested deeply (this particular case was inside a function inside a
when
block).
🙏 1
a
Alex
12/16/2021, 8:27 AM
Thanks, I will have a look!
n
nschulzke
12/16/2021, 4:58 PM
It happened again for me. The one thing that was consistent was that they were both inside of a