libmir/mir-ion

serdeEnumProxy not working inside Variants

WebFreak001 opened this issue · 0 comments

See #28 (comment)

@serdeEnumProxy!int
enum MyEnum
{
	off, on
}

struct ServerCapabilities
{
	Variant!(void, bool, MyEnum) v;
}

trying to deserialize JSON {"v":0} results in Unexpected IonTypeCode for Algebraic!(void, bool, MyEnum)

This issue does not occur with Nullable!MyEnum or Variant!(void, MyEnum) because of a special otpimization case for these simple cases (#28)

Right now this is not a high priority issue for me, but documenting it because it could lead to issues in the future and we might want to fix this eventually.