pquerna / ffjson

faster JSON serialization for Go
Apache License 2.0
2.96k stars 235 forks source link

Fix named slices #244

Open erikdubbelboer opened 6 years ago

erikdubbelboer commented 6 years ago

When a type is a slice of another type we should use the type name itself and not a slice of the elements of the slice.

Fixes #243

pquerna commented 5 years ago

Can you add a test case for this?

erikdubbelboer commented 5 years ago

@pquerna I have added a test. Without my change the test will fail with:

cannot use &[]IntType literal (type *[]IntType) as type *NamedSlice in assignment