rharter/auto-value-moshi

Unable to build when implement the generic class

KKChong opened this issue · 4 comments

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

Can you provide a code snippet? That's not enough information for us to be able to help

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)

Thanks for catching that. Care to submit a PR with the update?

Fixed with #141