Skip to content
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

Fix WTG1002 false-positive in enumerable subclasses #214

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

yaakov-h
Copy link
Member

@yaakov-h yaakov-h commented Aug 8, 2023

This comes from the case discussed in Teams.

When a foreach-able object is invoked via a subclass, we don't necessarily locate the correct GetEnumerator method. This PR fixes EnumerableTypeUtils.GetElementType to check the base classes as well.

Tracked by WI00633703.

@yaakov-h yaakov-h merged commit eb4423c into master Aug 8, 2023
7 checks passed
@yaakov-h yaakov-h deleted the yaakov/WTG1002-NonGenericCollection branch August 8, 2023 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants