hey folks, I've been a while without the error `Co...
# multiplatform
t
hey folks, I've been a while without the error
Conflicting overloads
when I'm using
expect/actual
in a module that have
jvm
and
android
targets. Today I found that this error still happening and I would like to know if Kotlin has solved yet or what is the best approach to avoid it?
Copy code
// common
expect fun doSomething()

// jvm
actual fun doSomething()

// android
actual fun doSomething() <- Conflicting overloads
Compiler still forcing to implement the
actual
but don't build and report
Conflicting overloads
m
You need an intermediate source set for which
jvm
and
android
inherit from e.g.
Copy code
commonMain
  |
  |--- jvmAndroidMain
  |       |--- androidMain
  |       '--- jvmMain
  '--- nonJvmMain
          |...
👍 1