Range of empty signature module expends to last comment
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
Please provide a succinct description of the issue.
Consider the following code in a signature file:
```fsharp
module foo
// bar
// baz
```
Matching AST:
```fsharp
SigFile
(ParsedSigFileInput
("tmp.fsi", QualifiedNameOfFile foo, [], [],
[SynModuleOrNamespaceSig
([foo], false, NamedModule, [],
PreXmlDoc ((1,6), FSharp.Compiler.XmlDoc+XmlDocCollector), [], None,
tmp.fsi (1,0--4,6) IsSynthetic=false)]))
```
**Expected behavior**
`SynModuleOrNamespaceSig` should span from line 1 to line 1.
**Actual behavior**
The last comment is included in the range of the `SynModuleOrNamespaceSig`.
This is not the case for the implementation file.
**Known workarounds**
Calculate the range using the name of the module/namespace.
**Related information**
FCS 39.
Contributor guide
Assessment
This issue has not been assessed yet.