You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encapsulate field on x (either via the command or with the "and use property" variation) in
classProgram{intx;publicrefintM(){returnrefx;}}
Expected: Only update references to reference the property where it is valid to do so. Maybe there's a use for "Encapsulate Field to ref-returning property", but right now I doubt that will be a common enough pattern to offer every time someone wants to encapsulate a field.
classProgram{intx;publicintX{get{returnx;}set{x=value;}}publicrefintM(){returnrefx;// Still referencing field}}
Actual: ref references to the field are updated to use the property, which is illegal (without making the property ref-returning).
Encapsulate field on
x
(either via the command or with the "and use property" variation) inExpected: Only update references to reference the property where it is valid to do so. Maybe there's a use for "Encapsulate Field to ref-returning property", but right now I doubt that will be a common enough pattern to offer every time someone wants to encapsulate a field.
Actual:
ref
references to the field are updated to use the property, which is illegal (without making the property ref-returning).The text was updated successfully, but these errors were encountered: