Hi there! I have just faced with a situation. The...
# multiplatform
i
Hi there! I have just faced with a situation. There are an expected interface and corresponding actual one
Copy code
expect interface Service {
    fun load()
    fun error(error: Throwable?)
}
Copy code
interface Service {
    fun load()
    fun error(error: Throwable?) {}
}
The actual interface was written in an external library, can’t be midfied and is used through typealias
Copy code
actual typealias Service = com.lib.Service
In that case we have an error “The following declaration is incompatible because modality is different” due to method “error” that has empty default implementation in the library. Does anybody have an idea how to deal with that? I have invented wrappers but I hope for a better solution.