Skip to content

Commit

Permalink
Merge pull request #940 from MatthijsPrent/main
Browse files Browse the repository at this point in the history
Fixing issue Unit returning functions yield warning #936
  • Loading branch information
nojaf authored Sep 13, 2024
2 parents 31e0a51 + ee74bbc commit b7c8f86
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/FSharp.Formatting.ApiDocs/GenerateModel.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b7c8f86

Please sign in to comment.