Unused opens: extension member in namespace is ignored in analysis
Open
Area-FCS
Bug
Impact-Medium
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
In the following code `P1` extension is declared in a namespace, it's not allowed. The symbol is successfully resolved in another namespace (it's good for the tooling), but is not accounted in unused opens analysis.
```fsharp
namespace Ns1
type System.String with
member this.P1 = 1
namespace Ns2
open Ns1
module Module =
"".P1
```
`open Ns1` is considered unused:

Works as expected for extension in a module:
Contributor guide
Assessment
This issue has not been assessed yet.