I have a library that uses C#8 and targets the .net 2.1 standard framework. One of the serialized types is abstract, so I've implemented it as a union in MemoryPack.
MemoryPackGenerator.Emitter.cs generates the following code:
static readonly System.Collections.Generic.Dictionary<Type, ushort> __typeToTag = new System.Collections.Generic.Dictionary<Type, ushort>({{UnionTags.Length}})
I'm going to look into creating a PR with a fix for this, but I've never contributed to an OSS project before, so it may take me some time to figure out how to do so.
I have a library that uses C#8 and targets the .net 2.1 standard framework. One of the serialized types is abstract, so I've implemented it as a union in MemoryPack.
MemoryPackGenerator.Emitter.cs generates the following code:
This code causes the compiler to emit the error:
A google search of this error message suggests that the issue is the new key word without a corresponding object type after the new.
I believe this problem can be fixed in the source generator by changing line 1092 from:
to
I'm going to look into creating a PR with a fix for this, but I've never contributed to an OSS project before, so it may take me some time to figure out how to do so.