Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue Unit returning functions yield warning #936 #940

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading