Support C# 13 params collections in argument matching - #993
Merged
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dtchepak
previously approved these changes
Aug 10, 2026
dtchepak
left a comment
Member
There was a problem hiding this comment.
LGTM 👍
Some random, non-blocking comments so feel free to ignore them and merge.
dtchepak
approved these changes
Aug 11, 2026
This was referenced Aug 11, 2026
This was referenced Aug 24, 2026
renebentes
pushed a commit
to renebentes/3054
that referenced
this pull request
Aug 24, 2026
Updated [NSubstitute](https://github.com/nsubstitute/NSubstitute) from 6.1.0 to 6.2.0. <details> <summary>Release notes</summary> _Sourced from [NSubstitute's releases](https://github.com/nsubstitute/NSubstitute/releases)._ ## 6.2.0 # NSubstitute v6.2.0 This release improves generic call matching (#989, #974, #990). Thanks to @zvirja and @JMolenkamp for fixes this. We've also switched to using trusted nuget publishing linked to GitHub Releases. (#987, @zvirja) ## What's Changed * Add trusted nuget publish by @zvirja in nsubstitute/NSubstitute#987 * fix: Stop using return-type assignability for generic call matching by @zvirja in nsubstitute/NSubstitute#989 * Remove skip-duplicate option from NuGet push command by @zvirja in nsubstitute/NSubstitute#988 * Add tag trigger for release pipeline by @zvirja in nsubstitute/NSubstitute#991 * Fix broken comparison of the generic methods by @zvirja in nsubstitute/NSubstitute#990 * Support C# 13 params collections in argument matching by @zvirja in nsubstitute/NSubstitute#993 * Add tests for nullable Task by @zvirja in nsubstitute/NSubstitute#994 **Full Changelog**: nsubstitute/NSubstitute@v6.1.0...v6.2.0 Commits viewable in [compare view](nsubstitute/NSubstitute@v6.1.0...v6.2.0). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #905
Currently we support
paramsfor arrays only, while since C# 13 we could have many more types here. This PR adds support for that. I deprecated some of the code instead of deleting it just to play safe.I tried to keep all params syntax knowledge in one class, so it's easy to maintain our interop with language. I also extracted all tests into a partial class - so it's easier to maintain it, as argument matching spec is growing quite a lot.
Notice, we still don't support
Span/ReadOnlySpanprimarily due to luck of support by the proxy library. I mentioned that in #992 so it's not lost.