david.bilik
02/23/2018, 12:37 PMinterface ApiCallback<in T> {
fun onSuccess(data: T)
fun onError(error: Throwable)
}
and then I have some class
expect class Api {
fun login(email: String, password: String, callback: ApiCallback<LoginResponse>)
}
and when I try to build with compileKonan
command, it fails on
src/main/kotlin/model/Api.kt:10:21: error: actual function 'login' has no corresponding expected declaration
The following declaration is incompatible because parameter types are different:
public final expect fun login(email: String, password: String, callback: ApiCallback<LoginResponse>): Unit
actual fun login(email: String, password: String, callback: ApiCallback<LoginResponse>) {
^
src/main/kotlin/model/Api.kt:10:77: error: unresolved reference: LoginResponse
actual fun login(email: String, password: String, callback: ApiCallback<LoginResponse>) {
^
other methods work.. so my only guess is this this generic classolonho
02/23/2018, 4:45 PMdavid.bilik
02/23/2018, 4:48 PM