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

Mark type as instantiated when used with a collection expression initializer #7229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CollinAlpert
Copy link
Contributor

@CollinAlpert CollinAlpert commented Mar 6, 2024

Affected analyzer: AvoidUninstantiatedInternalClassesAnalyzer
Affected diagnostic ID: CA1812

This PR prevents an internal class which is instantiated via collection initializer to be marked as uninstantiated by the analyzer.

Fixes #7223

@CollinAlpert CollinAlpert requested a review from a team as a code owner March 6, 2024 22:37
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.46%. Comparing base (7b1f39d) to head (9380fec).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7229      +/-   ##
==========================================
- Coverage   96.46%   96.46%   -0.01%     
==========================================
  Files        1432     1432              
  Lines      342185   342198      +13     
  Branches    11280    11280              
==========================================
+ Hits       330104   330114      +10     
- Misses       9230     9232       +2     
- Partials     2851     2852       +1     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CA1812 generates false positive when class is created using collection initialization
1 participant