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 in property accessors #108413

Merged
merged 5 commits into from
Oct 3, 2024
Merged

Conversation

cston
Copy link
Member

@cston cston commented Sep 30, 2024

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

Continuation of #108219, #108225.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Sep 30, 2024
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Sep 30, 2024
Copy link
Contributor

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

@cston
Copy link
Member Author

cston commented Oct 2, 2024

cc @stephentoub, @jaredpar

A 3rd PR that should cover the remaining cases of field references in property accessors.

(See test PR #108468 which builds these changes with the latest dotnet/roslyn toolset. That PR has test failures with [wasm] DebuggerTests but those seem to be a known issue #108072.)

The 3 PRs for field, including this one:

It looks like only the first one has been ported to [release/9.0]: see #108222. Should the other two be cherry-picked into that same PR?

@@ -144,9 +144,9 @@ private class SimpleType
[Kept]
public int memberKept {
[Kept]
get { return field; }
get { return @field; }
Copy link
Member

Choose a reason for hiding this comment

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

I'd rename this to "fieldKept" to match the rest of the test - and it will resolve the problem as well.

@stephentoub
Copy link
Member

Should the other two be cherry-picked into that same PR?

Yes, once we believe we're done with all the changes in main, we should cherry-pick them into that branch and bring it through tactics.

@sbomer
Copy link
Member

sbomer commented Oct 3, 2024

Merging to unblock ci

@sbomer sbomer merged commit f428917 into dotnet:main Oct 3, 2024
74 of 78 checks passed
cston added a commit that referenced this pull request Oct 3, 2024
* Update field references in property accessors

* Update field references

* Use @

* Rename field

---------

Co-authored-by: Stephen Toub <[email protected]>
lambdageek pushed a commit to lambdageek/runtime that referenced this pull request Oct 3, 2024
* Update field references in property accessors

* Update field references

* Use @

* Rename field

---------

Co-authored-by: Stephen Toub <[email protected]>
sirntar pushed a commit to sirntar/runtime that referenced this pull request Oct 8, 2024
* Update field references in property accessors

* Update field references

* Use @

* Rename field

---------

Co-authored-by: Stephen Toub <[email protected]>
stephentoub added a commit that referenced this pull request Oct 10, 2024
* Update field references in property accessors

* Update field references in property accessors (#108225)

* Update field references in property accessors (#108413)

* Update field references in property accessors

* Update field references

* Use @

* Rename field

---------

Co-authored-by: Stephen Toub <[email protected]>

---------

Co-authored-by: Charles Stoner <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants