We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Type Extensions
1 parent ae05ce5 commit 532007cCopy full SHA for 532007c
src/FSharp.Formatting.ApiDocs/GenerateModel.fs
@@ -2737,6 +2737,11 @@ module internal SymbolReader =
2737
let exts, nsdocs2 =
2738
readMembers ctx entityUrl ApiDocMemberKind.TypeExtension modul (fun v -> v.IsExtensionMember)
2739
2740
+ // `with get and set` syntax is sugar for a mutable field, a get binding and a set binding
2741
+ // This result in duplicated Method Extensions, we use DeclarationLocation to keep only one
2742
+ // See https://github.com/fsprojects/FSharp.Formatting/issues/941
2743
+ let exts = exts |> List.distinctBy (fun m -> m.Symbol.DeclarationLocation)
2744
+
2745
let pats, nsdocs3 =
2746
readMembers ctx entityUrl ApiDocMemberKind.ActivePattern modul (fun v -> v.IsActivePattern)
2747
0 commit comments