You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like sszgen is not respecting the slice type when it is an alias of an integer. I think this has to do with one of the previous fixes that took advantage of the implicit conversion between the two.
$ sszgen --path main.go
$ go run ../main_encoding.go:62:11: cannot use ssz.ExtendUint64(f.Bar, num) (value of type []uint64) as type []U64Str in assignment./main_encoding.go:62:28: cannot use f.Bar (variable of type []U64Str) as type []uint64 in argument to ssz.ExtendUint64./main_encoding.go:97:20: cannot use i (variable of type U64Str) as type uint64 in argument to hh.AppendUint64
The text was updated successfully, but these errors were encountered:
This is a hard issue to solve. The unmarshaller uses this function to efficiently allocate the array, but the function expects []uint type. I do not think the types can be casted.
However, something like this works:
type ArrayUint []uint64
type Case4 struct {
Val ArrayUint `ssz-size:"32"`
}
It seems like
sszgen
is not respecting the slice type when it is an alias of an integer. I think this has to do with one of the previous fixes that took advantage of the implicit conversion between the two.The text was updated successfully, but these errors were encountered: