Unable to build when implement the generic class
KKChong opened this issue · 4 comments
KKChong commented
how to use the generic class?
i got this error when build -> error: non-static type variable T cannot be referenced from a static context
ZacSweers commented
Can you provide a code snippet? That's not enough information for us to be able to help
KKChong commented
i think the readme quite misleading under the "Generics Support"
public static <T> JsonAdapter<Foo<T>> jsonAdapter(Moshi moshi, Type[] types)
instead of
public static JsonAdapter<Foo<T>> jsonAdapter(Moshi moshi, Type[] types)
rharter commented
Thanks for catching that. Care to submit a PR with the update?