dotnet / dotnet/roslyn

Error reporting in `OverloadResolutionResult.HadAmbiguousBestMethods` seems unreachable

Open
#80,507 0 comments 0 reactions 0 assignees View on GitHub
Area-Compilers Concept-Design Debt
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.