SourceGeneratedReflectionOperations.GetDeclaredMethod
should throw if multiple methods are found.
#4338
Labels
SourceGeneratedReflectionOperations.GetDeclaredMethod
should throw if multiple methods are found.
#4338
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).
The text was updated successfully, but these errors were encountered: