diff --git a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs index 9b406e67..218f64d4 100644 --- a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs +++ b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs @@ -346,10 +346,19 @@ type ApiDocMember m.StartColumn pn - for (_psym, pnm, _pn, _pty) in paramTypes do + for (psym, pnm, _pn, _pty) in paramTypes do match pnm with | None -> - printfn "%s(%d,%d): warning: a parameter was missing a name" m.FileName m.StartLine m.StartColumn + match psym with + | Choice1Of2 p -> + if isUnitType p.Type |> not then + printfn + "%s(%d,%d): warning: a parameter was missing a name" + m.FileName + m.StartLine + m.StartColumn + | Choice2Of2 _ -> + printfn "%s(%d,%d): warning: a field was missing a name" m.FileName m.StartLine m.StartColumn | Some nm -> if not (tdocs.ContainsKey pnm) then printfn