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

Don't emit CA1849 for nameof expressions #7010

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

CollinAlpert
Copy link
Contributor

This PR ensures that referencing properties like Task<T>.Result and ValueTask<T>.Result in a nameof expression doesn't trigger CA1849.

Fixes #6993

@CollinAlpert CollinAlpert requested a review from a team as a code owner October 29, 2023 10:44
@codecov
Copy link

codecov bot commented Oct 29, 2023

Codecov Report

Merging #7010 (6b82e4e) into main (b4ed6a3) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #7010      +/-   ##
==========================================
- Coverage   96.43%   96.42%   -0.01%     
==========================================
  Files        1410     1410              
  Lines      336268   336287      +19     
  Branches    11107    11108       +1     
==========================================
+ Hits       324268   324279      +11     
- Misses       8896     9209     +313     
+ Partials     3104     2799     -305     

Copy link
Contributor

@mavasani mavasani left a comment

Choose a reason for hiding this comment

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

Thanks!

@mavasani mavasani merged commit 2426f19 into dotnet:main Oct 30, 2023
14 checks passed
@CollinAlpert CollinAlpert deleted the issue-6993 branch October 30, 2023 08:54
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.

CA1849 triggers when using nameof of a Task property in an async method
2 participants