serdedotnet / serde

Serde.NET is a C# port of the popular Serde serialization library for Rust
https://serdedotnet.github.io/
BSD 3-Clause "New" or "Revised" License
154 stars 6 forks source link

Fix deserialization of enums as generic arguments #101

Closed agocke closed 1 year ago

agocke commented 1 year ago

In the case of compound types where wrappers are needed (e.g., lists), the generator code didn't attempt to create wrappers for enums. This resulted in bad codegen for deserializing compound types containing enums.

The code has been slightly refactored to make forgetting this harder, by introducing a new method to try to centralize wrapper fetching.