Skip to content

Commit

Permalink
Use setter symbol when current symbol is a property.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Aug 30, 2023
1 parent 04ef874 commit 379bd2f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/FsAutoComplete.Core/ParseAndCheckResults.fs
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,14 @@ type ParseAndCheckResults
if symbol.IsPropertyGetterMethod then
Ok(typ, [], [])
else
let symbol =
// Symbol is a property with both get and set.
// Take the setter symbol in this case.
if symbol.HasGetterMethod && symbol.HasSetterMethod then
symbol.SetterMethod
else
symbol

let parms =
symbol.CurriedParameterGroups
|> Seq.map (
Expand Down

0 comments on commit 379bd2f

Please sign in to comment.