False positive `Open declaration can be removed` when having records with the same name
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
**Repro steps**
Consider this code
```fsharp
namespace Case2
module RecordA =
type Record = { Foo: string }
module RecordB =
type Record = { Bar: string }
module Use =
open RecordB // actually not required
open RecordA
open RecordB // TODO: false positive
let convertBToA (recordB: Record) =
{ Foo = recordB.Bar }
```
VS marks second `open RecordB` as unnecessary. Removal of it breaks compilation because we actually need `RecordB.Record` and `open RecordA` shadows it.

**Expected behavior**
Suggested refactorings do not break compilation and highlight correct targets for change
**Actual behavior**
Suggested refactoring breaks compilation.
**Known workarounds**
.
Provide any related information (optional):
.NET SDK: 7.0.403
Visual Studio 17.7.6
Contributor guide
Assessment
This issue has not been assessed yet.