-
-
Notifications
You must be signed in to change notification settings - Fork 108
fix(assert): adjust overload resolution priorities for dictionary and set assertions #4408
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
Conversation
SummaryThis PR fixes ambiguous overload resolution for types implementing both mutable and read-only collection interfaces (e.g., ImmutableHashSet) by adjusting overload resolution priorities. Critical IssuesNone found ✅ SuggestionsNone - the fix is minimal, targeted, and includes a proper regression test. AnalysisThe PR resolves the compilation error reported in #4406 by adjusting For Sets:
For Dictionaries (preventive fix):
This makes mutable interfaces (priority 3) preferred over read-only interfaces (priority 2) when types implement both, which is consistent and reasonable since mutable interfaces are more specific. Both Verdict✅ APPROVE - No critical issues |
SummaryFixes compilation error for types implementing both IReadOnlySet and ISet (like ImmutableHashSet) by adjusting overload resolution priorities. Critical IssuesNone found ✅ AnalysisThe PR correctly addresses issue #4406 by adjusting OverloadResolutionPriority attributes:
This ensures that when a type implements both interfaces (like ImmutableHashSet or ImmutableDictionary<K,V>), the more specific mutable interface overload is chosen, resolving the ambiguity. The changes follow TUnit rules:
Verdict✅ APPROVE - No critical issues |
Fixes #4406