```inline fun <T : Any> fromServerResp(json:...
# android
n
Copy code
inline fun <T : Any> fromServerResp(json: String): T {
    val baseResp: BaseResp<T> =
        Gson().fromJson(json, object : TypeToken<BaseResp<T>>() {}.type)
  ...
  return baseResp.data!!
Why the inline function generates a new class when it is called across modules, but it cannot be called in the same module?
p
As I understood your question. “inline” includes all the code to place where inline method is called
n
in same module ,this code can't work,because TypeToken class type is T, but in different module ,TypeToken class type is specific class
1111.png
k
Can you show how you're calling it?
n
Copy code
val result = fromServerResp<BlockUserResult>(resp)
like this