-
Notifications
You must be signed in to change notification settings - Fork 468
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
Update field references #7430
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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 |
@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, |
There was a problem hiding this comment.
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 - we need this fix in 9.0 - presumably a backport PR will be created. |
/backport to release/9.0.1xx |
Started backporting to release/9.0.1xx: https://github.com/dotnet/roslyn-analyzers/actions/runs/11170944157 |
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 |
9.0.1xx should be the correct branch for GA. Also, source-build never uses any branches except x.x.1xx. |
Rename or qualify
field
references in property accessors to avoid conflict withfield
keyword in C# compiler preview.Fixes #7429