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

Loïc Lamarque

10/31/2023, 2:40 AM
Hi everyone, hope you are doing good. Does anybody knows how to deprecate a common function from a specific platform? Here's an example for illustrating my question:
Copy code
// Saying that we have the following function in the 'common' module:
fun doSomething() = Unit

// Now in the 'jvm' module, is it possible to deprecate it like so?
@Deprecated("Use 'doSomethingElse' instead.", ReplaceWith("doSomethingElse()"))
fun doSomething() = Unit
fun doSomethingElse() = Unit