Visitar URL original
Better constrain dictionary detection by AArnott · Pull Request #1687 · MessagePack-CSharp/MessagePack-CSharp · GitHub
Skip to content

Better constrain dictionary detection - #1687

Merged
AArnott merged 1 commit into
masterfrom
fix1686
Oct 6, 2023
Merged

AArnott merged 1 commit into
masterfrom
fix1686

Conversation

@AArnott

@AArnott AArnott commented Oct 4, 2023

Copy link
Copy Markdown
Collaborator
  • Searches for constructors should not match on static constructors
  • It is not enough for a class to implement IDictionary<K, V> to use GenericCollectionFormatter, which has a generic type constraint that requires IReadOnlyDictionary<K, V>.

Fixes #1686

@AArnott AArnott added this to the v2.5 milestone Oct 4, 2023
@AArnott

AArnott commented Oct 4, 2023

Copy link
Copy Markdown
Collaborator Author

@MrReny I'd appreciate your trying this out to confirm it unblocks you.

@MrReny

MrReny commented Oct 6, 2023

Copy link
Copy Markdown

@AArnott Sorry for late response. This is indeed fixed my issue. All tests are green, no regression. Thank you.

@AArnott
AArnott merged commit 7dcea24 into master Oct 6, 2023
@AArnott
AArnott deleted the fix1686 branch October 6, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cant serialize custom type derived from IDictionary<,>

2 participants