Skip to content

Renaming property renames get and set keywords use braking the code #18270

@xperiandri

Description

@xperiandri

Please provide a succinct description of the issue.

Repro steps

  1. Create any property
[<Struct>]
type IterationState<'T> = {
    /// A flag to stop the iteration.
    StopRef : bool Ref
} with
    member this.Stop
        with get () = this.StopRef.Value
        and set v = this.StopRef.Value <- v 
  1. Set cursor to Stop
  2. Rename
  3. See
    member this.ShouldStop
        with ShouldStop () = this.StopRef.Value
        and ShouldStop v = this.StopRef.Value <- v
F.property.rename.mp4

Expected behavior

Renamed only the property but not the getter and setter

Actual behavior

Getter and setter are being renamed along with a property

Related information

Provide any related information (optional):

Microsoft Visual Studio Enterprise 2022 (64-bit)
Version 17.12.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-LangService-RenameSymbolFCS and VS support for renaming symbolsBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.

    Type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions