Hi Is there a way to make data classes with defaul...
# kotlin-native
a
Hi Is there a way to make data classes with default parameter values work properly in Swift? Example:
Copy code
data class State @JvmOverloads constructor(
    val loading: Boolean = false,
    val data: ResponseBody? = null,
    val error: ApiError? = null
)
In Swift, it is resolved to
init(loading: Bool, data: ResponseBody?, error: ApiError?)
Neither with overloads or default values
a
1. Related discussion here, please take a look. 2. Also a reported issue from youtrack , pointing out the root cause.
a
Perfect, thank you!