Skip to content

Commit

Permalink
fixed a bug that reported that a unit parameter should have a name
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsPrent committed Sep 13, 2024
1 parent 31e0a51 commit c497ec9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/FSharp.Formatting.ApiDocs/GenerateModel.fs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ open FSharp.Formatting.Templating
open FSharp.Patterns
open FSharp.Compiler.Syntax


[<AutoOpen>]
module internal Utils =

Expand Down Expand Up @@ -346,10 +347,14 @@ 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 _ -> ()
| Some nm ->
if not (tdocs.ContainsKey pnm) then
printfn
Expand Down

0 comments on commit c497ec9

Please sign in to comment.