Skip to content

Commit

Permalink
Don't generate params for explicit getters/setters as they are flagge…
Browse files Browse the repository at this point in the history
…d invalid by the compiler
  • Loading branch information
dawedawe committed Apr 20, 2024
1 parent 9c04d1e commit 5c48c55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
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

0 comments on commit 5c48c55

Please sign in to comment.