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

Bunch of fixes for CA1859 #6418

Merged
merged 1 commit into from
Jan 9, 2023
Merged

Bunch of fixes for CA1859 #6418

merged 1 commit into from
Jan 9, 2023

Conversation

geeknoid
Copy link
Member

@geeknoid geeknoid commented Jan 7, 2023

@geeknoid geeknoid requested a review from a team as a code owner January 7, 2023 00:20
@codecov
Copy link

codecov bot commented Jan 7, 2023

Codecov Report

Merging #6418 (c9f6684) into main (6ae2683) will decrease coverage by 0.00%.
The diff coverage is 97.77%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6418      +/-   ##
==========================================
- Coverage   96.15%   96.15%   -0.01%     
==========================================
  Files        1365     1365              
  Lines      317448   317494      +46     
  Branches    10263    10269       +6     
==========================================
+ Hits       305230   305273      +43     
+ Misses       9785     9784       -1     
- Partials     2433     2437       +4     

Copy link
Contributor

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, thank you! Will wait for the open question resolved before merge

* When using the ?? operator, the nullable annotation for the left-hand operand is now erased. This prevents the analyzer suggesting to use a replacement nullable type rather than its non-nullable variation.

* We no longer suggest to upgrade the type of a local/field/parameter if the symbol is being used to invoke a method that's is an explicit implementation of an interface method. If the user would upgrade the type, the call to that method would no longer work.

* Ensure that we never recommend upgrading the signature of a method that implements an interface method.

* Don't recommend a method to be upgraded if the method is an implementation of a partial method definition. This is because there might be different implementations of the method with conflicting behavior. Note that if you use #if constructs, the diagnostic may still make recommendations that would break your code since the analyzer only knows about the select #if block.

* Remove a field-specific optimization that was designed to speed up the analyzer since it actually broke analysis of fields, yielding bogus analysis results.
@buyaa-n buyaa-n merged commit 542756c into dotnet:main Jan 9, 2023
@github-actions github-actions bot added this to the vNext milestone Jan 9, 2023
@Youssef1313
Copy link
Member

#6411 #6413 #6414 #6416 @geeknoid Are all these issues fixed and can be closed?

@geeknoid
Copy link
Member Author

geeknoid commented Jan 17, 2023

@Youssef1313 Yes, all these issues were fixed.

@Youssef1313
Copy link
Member

Thanks @geeknoid. I went ahead and closed the four issues.

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.

3 participants