I have: ```interface UseCase<in Request : Any, ...
# announcements
d
I have:
Copy code
interface UseCase<in Request : Any, out Response: Any> {
    suspend fun execute(request: Request): Response

    suspend operator fun invoke(request: Request): Response = execute(request)
}
But when I call an implementation of it in a unit test, it throws:
Copy code
usecase.SomeUseCase.invoke(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
java.lang.AbstractMethodError: usecase.SomeUseCase.invoke(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
what could this be?
The problem seemed to be when the invoke was a member function but when I extracted it out to:
suspend inline operator fun <reified Request : Any, reified Response : Any> UseCase<Request, Response>.invoke(request: Request): Response = execute(request)
it worked... 🤔
d
Funny, in my case it's a kotlin interface... but I guess you mean that it's compiled the same way... thanks, I'll track that issue.