Skip to content

Fix matching generic calls with AnyType when the generic argument is also a generic argument in return type, out or ref parameter#862

Merged
dtchepak merged 3 commits intonsubstitute:mainfrom
JMolenkamp:fix-generic-any-type-matching
Mar 16, 2025
Merged

Fix matching generic calls with AnyType when the generic argument is also a generic argument in return type, out or ref parameter#862
dtchepak merged 3 commits intonsubstitute:mainfrom
JMolenkamp:fix-generic-any-type-matching

Conversation

@JMolenkamp
Copy link
Copy Markdown
Contributor

Allow matching the following methods with use of Arg.AnyType:

IEnumerable<T> SomeMethod<T>()
void SomeMethod<T>(out IEnumerable<T> result)
void SomeMethod<T>(ref IEnumerable<T> result)

@JMolenkamp
Copy link
Copy Markdown
Contributor Author

Split off from #855 which contained both fixes and a feature request. This one only contains fixes.

@dtchepak dtchepak merged commit fed12c4 into nsubstitute:main Mar 16, 2025
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.

2 participants