https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

svenjacobs

08/20/2022, 9:56 AM
Hello, I’m just getting started with KMM and tripped over this compile error.
sqlPlatformModule
is implemented in both
androidMain
and
iosMain
. Interestingly when moving
sqlPlatformModule
to another file this works 🤷🏼‍♂️ Is this a current limitation of Kotlin Multiplatform?
j

Jeff Lockhart

08/20/2022, 3:23 PM
Does it still compile? You could probably add:
Copy code
@Suppress("UNINITIALIZED_VARIABLE")
above the line to hide the IDE error. It's not uncommon that the IDE displays false positive errors that aren't actually compilation errors with KMP.
x

xxfast

08/21/2022, 2:18 AM
would you see the same error if the
sqlPlatformModule
is defined in a seperate file?
s

svenjacobs

08/21/2022, 9:19 AM
@Jeff Lockhart It is not an IDE false positive. Code does also not compile from command line.
@xxfast As I wrote above 😉 it does compile when I move
sqlPlatformModule
to another file.
x

xxfast

08/21/2022, 10:06 AM
yea this seems like a tooling limitation
4 Views