-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Encapsulate field assist doesn't move override annotations #56559
Comments
Summary: The "encapsulate field" assist fails to move |
@fshcheglov I think this is a good issue for you to solve. |
Question: Which annotations should be moved by this action? Moving the But what about Should all of the annotations be moved / duplicated? Or are there some that should and others that shouldn't? If the latter, is there a better way to know which ones than by having a hard-coded list? |
My humble opinion is that all should be moved. If there is one certain case where the user wants to remove them, it is easy enough and the new getter/setter would be working as the variable was. |
Ah, this is a good question about all other annotations. I also think moving all annotations to the getter / setter is right. It is impossible to know the intention of the user about something like In the most cases |
I have no objection to being slightly more intelligent about |
Repro:
Now use the "encapsulate field" assist on
D.x
and see the output:The assist should move the override annotations to where they are actually needed.
The text was updated successfully, but these errors were encountered: