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

Add support for non-literal array lengths #108

Closed
henridf opened this issue Sep 16, 2022 · 1 comment · Fixed by #112
Closed

Add support for non-literal array lengths #108

henridf opened this issue Sep 16, 2022 · 1 comment · Fixed by #112

Comments

@henridf
Copy link

henridf commented Sep 16, 2022

The following example fails due to the array length not being a *ast.BasicLit.

package badone

const ArrayLength = 1

type S struct {
	Arr [ArrayLength]byte `ssz-size:"10"`
}

It would be handy to be able to support such cases (this is coming up when sszgen-annotating geth's Header struct).

@ferranbt
Copy link
Owner

I will try to get something rolling on this for this week.

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

Successfully merging a pull request may close this issue.

2 participants