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

Update field references #7430

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Update field references #7430

merged 2 commits into from
Oct 3, 2024

Conversation

cston
Copy link
Member

@cston cston commented Oct 2, 2024

Rename or qualify field references in property accessors to avoid conflict with field keyword in C# compiler preview.

Fixes #7429

@cston cston requested a review from a team as a code owner October 2, 2024 23:14
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.49%. Comparing base (db5ed35) to head (c912265).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7430      +/-   ##
==========================================
- Coverage   96.50%   96.49%   -0.01%     
==========================================
  Files        1448     1448              
  Lines      346766   346760       -6     
  Branches    11399    11399              
==========================================
- Hits       334640   334618      -22     
- Misses       9238     9253      +15     
- Partials     2888     2889       +1     

@cston
Copy link
Member Author

cston commented Oct 3, 2024

@dotnet/roslyn-analysis, please review, thanks.

@@ -186,7 +186,7 @@ internal bool ShouldBeTrackedForAnalysis(bool hasCompletePointsToAnalysisResult)

public bool HasConstantValue => Symbol switch
{
IFieldSymbol field => field.HasConstantValue,
IFieldSymbol fieldSymbol => fieldSymbol.HasConstantValue,
ILocalSymbol local => local.HasConstantValue,
Copy link
Member

Choose a reason for hiding this comment

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

For consistency, could you also rename local to localSymbol?

@cston cston merged commit f2384e6 into dotnet:main Oct 3, 2024
11 checks passed
@cston cston deleted the field-references branch October 3, 2024 20:29
@NikolaMilosavljevic
Copy link
Member

@cston - we need this fix in 9.0 - presumably a backport PR will be created.

@cston
Copy link
Member Author

cston commented Oct 3, 2024

/backport to release/9.0.1xx

Copy link
Contributor

github-actions bot commented Oct 3, 2024

Started backporting to release/9.0.1xx: https://github.com/dotnet/roslyn-analyzers/actions/runs/11170944157

@carlossanlop
Copy link
Member

Should we create a release/9.0.2xx branch and backport this there instead?

Asking because I see we already have such branch in dotnet/sdk: https://github.com/dotnet/sdk/tree/release/9.0.2xx

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.

[9.0] Source-build issue in stage 2 build
5 participants