GeezerVison is showing github.com — fix duplicate registration of named tuples by honda-tatsuya · Pull Request #1464 · MessagePack-CSharp/MessagePack-CSharp
Conversation
Example
using MessagePack;
using System.Collections.Generic;
[MessagePackObject]
public class Test
{
[Key(0)] public Dictionary<((int A, int B) C, (int D, int E) F), ((int G, int H) I, (int J, int K) L)> Hoge;
[Key(1)] public ((int M, int N) O, (int P, int Q) R)[,] Fuga;
}
Before
static GeneratedResolverGetFormatterHelper()
{
lookup = new global::System.Collections.Generic.Dictionary<global::System.Type, int>(12)
{
{ typeof(((int A, int B) C, (int D, int E) F)), 0 },
{ typeof(((int G, int H) I, (int J, int K) L)), 1 },
{ typeof(((int M, int N) O, (int P, int Q) R)), 2 },
{ typeof(((int M, int N) O, (int P, int Q) R)[,]), 3 },
{ typeof((int A, int B)), 4 },
{ typeof((int D, int E)), 5 },
{ typeof((int G, int H)), 6 },
{ typeof((int J, int K)), 7 },
{ typeof((int M, int N)), 8 },
{ typeof((int P, int Q)), 9 },
{ typeof(global::System.Collections.Generic.Dictionary<((int A, int B) C, (int D, int E) F), ((int G, int H) I, (int J, int K) L)>), 10 },
{ typeof(global::Test), 11 },
};
}
This is runtime error
ArgumentException: An item with the same key has already been added. Key: System.ValueTuple`2[System.Int32,System.Int32]
After
static GeneratedResolverGetFormatterHelper()
{
lookup = new global::System.Collections.Generic.Dictionary<global::System.Type, int>(5)
{
{ typeof(((int, int), (int, int))), 0 },
{ typeof(((int, int), (int, int))[,]), 1 },
{ typeof((int, int)), 2 },
{ typeof(global::System.Collections.Generic.Dictionary<((int, int), (int, int)), ((int, int), (int, int))>), 3 },
{ typeof(global::Test), 4 },
};
}
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
thanks, it seems good.
approve to merge.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This pull request is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@AArnott I fixed it. sorry for the delay.
|
AArnott reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 26, 2025
This was referenced Dec 2, 2025
This was referenced Jan 22, 2026
This was referenced Jun 11, 2026
This was referenced Jun 11, 2026
This was referenced Jun 26, 2026
This was referenced Oct 19, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|