`open type T` treated as unused when unqualified extension member on `T` used
Open
Area-LangService-UnusedOpens
Bug
Impact-Low
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
See also #17619, but this issue applies to all types.
**Repro steps**
```fsharp
type T =
static member A = 99
[]
module M =
type T with
static member Lol = 3
// Shows as unused; the unused opens analyzer will suggest removing it…
open type T
// …Even though it's used.
let lol = Lol
```
**Expected behavior**
An `open type` declaration should be considered used if an unqualified use of an extension member on the type depends on it.
**Actual behavior**
An `open type` declaration is not considered used even if an unqualified use of an extension member on the type depends on it.
**Known workarounds**
N/A.
**Related information**
.NET 8, 9.
Contributor guide
Assessment
This issue has not been assessed yet.