fsharp
fsharp copied to clipboard
Wrong XmlDoc for union case when previous case contains no bar
Xml doc has wrong reported range (which may affect tooling) and a comment from previous case without bar is shown in the wrong case:
type U =
/// Aa
A
/// Bb
| B
With bar it works as expected:
type U =
/// Aa
| A
/// Bb
| B
Another issue is the comment is not detected for A at all:

I was about to report this exact issue, due to this: https://github.com/fsprojects/fantomas/issues/1563
What I was going to report was that the following gets no docstring emitted:
type Foo =
/// Hi!
Bar of int
Whereas it does in the following:
type Foo =
/// Hi!
| Bar of int