False positive Open declaration can be removed
when having records with the same name
#16226
Labels
Area-LangService-CodeFixes
Code fixes associated with diagnostics
Bug
Impact-Low
(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Repro steps
Consider this code
VS marks second
open RecordB
as unnecessary. Removal of it breaks compilation because we actually needRecordB.Record
andopen 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
The text was updated successfully, but these errors were encountered: