FSharp.Formatting icon indicating copy to clipboard operation
FSharp.Formatting copied to clipboard

If ApiDocMember correspond to a property with a setter ReturnType is equal to None

Open MangelMaxime opened this issue 3 years ago • 0 comments

Description:

My code:

let returnInfo =
    instanceMember.ReturnInfo.ReturnType
    |> Option.map (fun (fsharpType, _) ->
        Common.renderParameterType true fsharpType
        |> TextNode.ToHtml
    )

See how the member with a setter doesn't have the return type displayed.

image

Expected: ReturnType should be Some...

Code for reproduction:

type User =
    {
        Id : int
        Name : string
        Email : string
    }

    member this.GetterOnly
        with get () =
            "This is a getter only property"

    member this.SetterOnly
        with set (value : string) =
            ()

    member this.GetterAndSetter
        with get () =
            "This is a getter and setter property"
        and set (value : string) =
            ()

MangelMaxime avatar Jan 13 '22 20:01 MangelMaxime