From 5c48c55547e65db42ae432178ef56332b2f48be3 Mon Sep 17 00:00:00 2001 From: dawe Date: Sat, 20 Apr 2024 18:47:57 +0200 Subject: [PATCH] Don't generate params for explicit getters/setters as they are flagged invalid by the compiler --- src/FsAutoComplete.Core/Commands.fs | 4 ++-- test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/FsAutoComplete.Core/Commands.fs b/src/FsAutoComplete.Core/Commands.fs index 7a8290445..3a8b155d5 100644 --- a/src/FsAutoComplete.Core/Commands.fs +++ b/src/FsAutoComplete.Core/Commands.fs @@ -1397,7 +1397,7 @@ 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 @@ -1405,7 +1405,7 @@ type Commands() = headPat = SynPat.LongIdent(longDotId = longDotId)))) when rangeContainsPos longDotId.Range pos && xmlDoc.IsEmpty -> - Some(false, tryGetFirstAttributeLine attributes) + Some(true, tryGetFirstAttributeLine attributes) | _ -> None) | _ -> None) | _ -> None) diff --git a/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs b/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs index a7acd7fc2..d02985128 100644 --- a/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs +++ b/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs @@ -1752,7 +1752,6 @@ let private generateXmlDocumentationTests state = type MyClass() = let mutable someField = "" /// - /// /// member _.Name with get () = "foo" @@ -1794,7 +1793,6 @@ let private generateXmlDocumentationTests state = type MyClass() = let mutable someField = "" /// - /// /// member _.Name with set (x: string) = someField <- x