dotnet/roslyn

"Unused using" incorrectly reported in IDE

Open

#67.473 geöffnet am 23. März 2023

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (0 zugewiesene Personen)C# (4.257 Forks)batch import
Area-CompilersBugIDE-CodeStylehelp wanted

Repository-Metriken

Stars
 (20.414 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)

Beschreibung

Using VS 17.6p3 and working on the compiler project at this commit: https://github.com/jcouv/roslyn/tree/unused-using-bug-67473

I open ExtensionTypeTests.cs and notice a greyed out using directive: image

But I remove this using, I get an error on line 5449 which uses VariableDeclaratorSyntax: image

I tried investigating whether the compiler is producing an incorrect HDN_UnusedUsingDirective hidden diagnostic, using a command-line build under debugger, but the hidden diagnostic was not produced. So I suspect there is some IDE issue, possibly with how the compilation is set up.

image

Contributor Guide