Kotlin deprecated - is it possible to introduce new data class constructor where I want to combine two properties into one new data class and have it working with IDE replace action?
data class Data(
val title: String,
val action: () -> Unit?,
val actionContentDescription: String?
)
data class Data(
val title: String,
val action: ActionData?
)
data class ActionData(
val action: () -> Unit?,
val contentDescription: String?
)
I'm trying with
data class Data(
val title: String,
val action: ActionData?
) {
@Depricated(
"Use action data",
ReplaceWith("DataCtitle, ActionData(action, actionContentDescription)")
)
constructor(
val title: String,
val action: () -> Unit?,
val actionContentDescription: String?
) : this(....)
}
So far I don't see suggestion in IDE.