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

nameof calls should not warn on analyzer #2649

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

tlakollo
Copy link
Contributor

Add a condition to bypass nameof usage since it will not invoke the member and instead will be translated to load a string
Add tests
Fix ExpectedWarnings from disabled intrinsics that were producing warnings from accessing fields in a nameof call

Fixes #2647

…ber and instead will be translated to load an string

Add tests
Fix ExpectedWarnings from disabled intrinsics that were producing warnings from accessing fields in a nameof call
Copy link
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the fix.

@vitek-karas
Copy link
Member

I'm going to merge this as it unblocks some of the work on the intrinsics (or makes it easier)

@vitek-karas vitek-karas merged commit 6a82f4f into dotnet:main Feb 24, 2022
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
…ber and instead will be translated to load an string (dotnet/linker#2649)

Add tests
Fix ExpectedWarnings from disabled intrinsics that were producing warnings from accessing fields in a nameof call

Commit migrated from dotnet/linker@6a82f4f
@tlakollo tlakollo deleted the nameOfShouldNotWarn branch February 7, 2023 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RUC analyzer seems to react to nameof references
2 participants