Closed ruz closed 6 years ago
Thanks for this. I definitely appreciate your complete PR - test and fix.
Let me use the changes in the test file to reproduce the error and validate your fix. It is likely correct, but they may be a shorter solution that fits in with the codebase better.
I will follow up soon.
The appropriate fix is slightly different.
We should already account for decoding into "values" contained into an interface. E.g. int, float32, array, etc. All these values are non-addressable.
The function that checks if a value is non-addressable had a bug in it. Fixing that bug fixed the issue.
I will run a few checks to ensure all works well across all facets of codec (fast-path, reflection path, codecgen path, etc) and should have a fix in soon after.
TY. Nice one line fix. You have quite big code base to comprehend in a few hours.
the following was failing: type Some [1]byte
array in slice of interfaces is not addressable