I'm out of the loop, and this is probably a repeat...
# multiplatform
p
I'm out of the loop, and this is probably a repeated question. If you can point me to a conversation/thread here, that would be great. But I'm getting warnings for using expect/actual in my ancient dinosaur of a code. And I'm pointed to visit https://youtrack.jetbrains.com/issue/KT-61573 Though, I need a straightforward answer: What are we supposed to use? I can think that interface probably is the way to go, just my quickest thought, but otherwise, does anyone have a straight answer to this?
d
Expect/actual classes are still Experimental. Expect/actual functions are stable
m
You can also switch them off.
Copy code
kotlin {
    @OptIn(ExperimentalKotlinGradlePluginApi::class)
    compilerOptions {
        freeCompilerArgs.add("-Xexpect-actual-classes")
    }
    ...
}
p
I guess yes the suggestion was to switch it off as well. Just wondering why the expect/actual is just an experimental feature "all this time", and if ever they actually remove it completely, what would be the alternative to using it. but anyway thanks for these answers.
d
Please check the roadmap https://youtrack.jetbrains.com/issue/KT-64130/Roadmap-for-making-expect-actual-classes-stable As you see a lot of things are not clear yet. And JB cannot guarantee the compatibility for now