-
Notifications
You must be signed in to change notification settings - Fork 852
Labels
Area-LangService-CodeFixesCode fixes associated with diagnosticsCode fixes associated with diagnosticsBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Description
Repro steps
Consider this code
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-LangService-CodeFixesCode fixes associated with diagnosticsCode fixes associated with diagnosticsBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
