Error reporting in `OverloadResolutionResult.HadAmbiguousBestMethods` seems unreachable
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
See https://github.com/dotnet/roslyn/pull/80453#discussion_r2388306313.
> This would be reached if there were two `MemberResolutionResult`s which are both valid (applicable). But as far as I can see, if we ever have two `MemberResolutionResult`s which are valid, `OverloadResolution.RemoveWorseMembers` marks them as invalid (worse; not-applicable). So I think this might be unreachable, although I might be missing some overload resolution subtlety.
This issue is linked in code.
Contributor guide
Research direction
Start by tracing OverloadResolutionResult.HadAmbiguousBestMethods through the overload-resolution code, especially OverloadResolution.RemoveWorseMembers, and read the linked code reference and discussion. Determine whether the path is reachable; done means the finding is reflected in the implementation and any relevant coverage or comments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100