environments:
- Version used: 2.2.60
- Runtime: .NET Core
Bug description
Generated formatter declaration is invalid, for generic type that marked as string key.
it is tringKeyFormatterTemplate.tt bug.
https://github.com/neuecc/MessagePack-CSharp/blob/d61346e6ba810c5019a6f3a01cbe3055ca15c7e3/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.tt#L40
Isn't the correct code objInfo.GenericTypeParameters.Select(x => x.Name)?
Repro steps
Define generic type with [MessagePackObject(true)].
[MessagePackObject(true)]
public InventoryChangedValue<T>
{
public T Value { get; set; }
}
And execute generate.
Expected behavior
public sealed class InventoryChangedValueFormatter<T> : global::MessagePack.Formatters.IMessagePackFormatter<global::MyNameSpace.InventoryChangedValue<T>>
Actual behavior
public sealed class InventoryChangedValueFormatter<MessagePackCompiler.CodeAnalysis.GenericTypeParameterInfo> : global::MessagePack.Formatters.IMessagePackFormatter<global::MyNameSpace.InventoryChangedValue<T>>
environments:
Bug description
Generated formatter declaration is invalid, for generic type that marked as string key.
it is tringKeyFormatterTemplate.tt bug.
https://github.com/neuecc/MessagePack-CSharp/blob/d61346e6ba810c5019a6f3a01cbe3055ca15c7e3/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.tt#L40
Isn't the correct code
objInfo.GenericTypeParameters.Select(x => x.Name)?Repro steps
Define generic type with
[MessagePackObject(true)].And execute generate.
Expected behavior
Actual behavior