Skip to content
New issue

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

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

Already on GitHub? # to your account

Resolve ambiguity of .IndexOfOrNone extension method #855

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bash
Copy link
Member

@bash bash commented Feb 18, 2025

Currently using IndexOfOrNone on a concrete immutable collection such as ImmutableArray or ImmutableList results in an ambiguous overload error.

This was not directly fixable using [OverloadResolutionPriority] since the conflicting extension methods are in two different classes.

I moved the immutable list overloads to ListExtensions but kept the old methods around to avoid a binary breaking change. I only removed the this modifier (which is not a binary breaking change, see #346)

This PR is probably best reviewed on a per-commit basis :)

@bash bash requested review from FreeApophis and Mafii February 18, 2025 20:25
@bash bash enabled auto-merge February 18, 2025 20:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant