I know a lot of similar questions here in StackOverflow, but nothing solved mine.
I have a generic data class:
data class ServiceCall<out T>(val result: T?, val exception: String?, val pagination: String?, val stringResult: String?)
I am trying to use like this:
Gson().fromJson(json, ServiceCall<SurveyListModel>::class.java).result
IDE shows error: only classes are allowed on the left hand side of a class literal
How to solve this? Thanks in advance.