Skip to content
New issue

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

bug(generator): cannot generate when go 1.18+ generics are used. #159

Open
itsdevbear opened this issue Apr 16, 2024 · 3 comments
Open

bug(generator): cannot generate when go 1.18+ generics are used. #159

itsdevbear opened this issue Apr 16, 2024 · 3 comments

Comments

@itsdevbear
Copy link

Generator blows up really hard on generics, would be nice to handle.

@letonchanh
Copy link
Contributor

Currently, decodeASTStruct does not consider TypeParams of ast.TypeSpec. That's why structs with generics cannot be generated. To support generics, I think fastssz also needs to decode TypeParams.

@ferranbt
Copy link
Owner

Do you have an elaborated set of examples on how do you want to use generics? I am trying to understand the full scope. The example in #160 should be fairly easy to handle in itself.

@ferranbt
Copy link
Owner

This is a fix to encode the struct in #160.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants