We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I use v0.7.7, code with generics fails:
v0.7.7
Error parsing model.go: model.go:41:27: expected ';', found '[' (and 2 more errors) model.go:1: running "easyjson": exit status 1
Any plans to have generics support in the near future?
The text was updated successfully, but these errors were encountered:
+1 Do you have any plans for it?
Sorry, something went wrong.
+1 At the very least generic types should be skipped for processing (potentially with a warning) instead of erroring.
Are there any updates ? There are some problems with types when try to generate code that contains generics with pointer types.
Example:
package some_package; //easyjson:json type SecondNested struct { SomeField bool `json:"someField"` } type NestedStruct[U json.Unmarshaler] struct { SecondNested U `json:"secondNested"` } type Main[U json.Unmarshaler] struct { NestedStructs NestedStruct[U] `json:"nested"` } //easyjson:json type SomeType struct { Main[*SecondNested] }
Generated code:
func easyjson<...>SecondNested(in *jlexer.Lexer, out *NestedStruct[*some_package.SecondNested]) {} func easyjson<...>SecondNested(out *jwriter.Writer, in NestedStruct[*some_package.SecondNested]) {}
Problem is at this type *some_package.SecondNested, there must not be some_package in type declaration.
No branches or pull requests
I use
v0.7.7
, code with generics fails:Any plans to have generics support in the near future?
The text was updated successfully, but these errors were encountered: