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

Don't generate params for explicit getters/setters #1268

Merged
merged 1 commit into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/FsAutoComplete.Core/Commands.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1397,15 +1397,15 @@ type Commands() =
headPat = SynPat.LongIdent(longDotId = longDotId)))) when
rangeContainsPos longDotId.Range pos && xmlDoc.IsEmpty
->
Some(false, tryGetFirstAttributeLine attributes)
Some(true, tryGetFirstAttributeLine attributes)
| SynMemberDefn.GetSetMember(
memberDefnForGet = Some(SynBinding(
attributes = attributes
xmlDoc = xmlDoc
headPat = SynPat.LongIdent(longDotId = longDotId)))) when
rangeContainsPos longDotId.Range pos && xmlDoc.IsEmpty
->
Some(false, tryGetFirstAttributeLine attributes)
Some(true, tryGetFirstAttributeLine attributes)
| _ -> None)
| _ -> None)
| _ -> None)
Expand Down
2 changes: 0 additions & 2 deletions test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,6 @@ let private generateXmlDocumentationTests state =
type MyClass() =
let mutable someField = ""
/// <summary></summary>
/// <param name="x"></param>
/// <returns></returns>
member _.Name
with get () = "foo"
Expand Down Expand Up @@ -1794,7 +1793,6 @@ let private generateXmlDocumentationTests state =
type MyClass() =
let mutable someField = ""
/// <summary></summary>
/// <param name="x"></param>
/// <returns></returns>
member _.Name
with set (x: string) = someField <- x
Expand Down
Loading