Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SourceGeneratedReflectionOperations.GetDeclaredMethod should throw if multiple methods are found. #4338

Open
Youssef1313 opened this issue Dec 13, 2024 · 0 comments

Comments

@Youssef1313
Copy link
Member

The existing behavior of reflection's GetDeclaredMethod is that if multiple methods are found, an exception is thrown.

One impact this will have is on [DynamicData(nameof(MyMethod), DynamicDataSourceType.Method]

If MyMethod has multiple overloads, we would throw an exception when using reflection, but the behavior is kinda undefined when using source generator. It depends on which overload is returned (current impl uses FirstOrDefault).

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

No branches or pull requests

1 participant