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

Differentiate between statics in setters and getters #1124

Conversation

TymurGubayev
Copy link
Contributor

Problem

#1054: Statics with same name in getter and setter cause a CONVERSION ERROR

Solution

  • Any comments on the approach taken, its consistency with surrounding code, etc.
    The solution is basically to store accessor kind in every IdentifierNameSyntax of a static, and to use that value later when doing the renaming.
  • Which part of this PR is most in need of attention/improvement?
    Currently, it creates _Prop_b and _Prop_b1, which is fine, but it would be nicer to get _Prop_Get_b and _Prop_Set_b instead. This is easy to achieve if every static from a property would get that infix. It's a bit more cumbersome if only those with duplicate name would get one.
  • At least one test covering the code changed

@GrahamTheCoder GrahamTheCoder merged commit c3a91c8 into icsharpcode:master Jul 27, 2024
2 checks passed
@TymurGubayev TymurGubayev deleted the fix/StaticsWithSameNameInGetAndSet/1 branch July 29, 2024 08:10
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.

2 participants