dotnet/roslyn

"Unused using" incorrectly reported in IDE

Open

#67.473 aperta il 23 mar 2023

Vedi su GitHub
 (1 commento) (1 reazione) (0 assegnatari)C# (4257 fork)batch import
Area-CompilersBugIDE-CodeStylehelp wanted

Metriche repository

Star
 (20.414 star)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

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

Guida contributor