You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect this is a compiler issue, as the AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer relies on the control flow graph to determine how variables are used.
Thanks @jcouv. This seems to be same as dotnet/csharplang#2235 (comment). Current IOperation tree and ControlFlowGraph have no special operation node for using declaration, it is just an Operation.None node wrapping the variable declaration. This leads to all CFG and IOperation clients that attempt to analyze reads and writes to see a variable declaration, whose underlying declared local is never referenced. I believe this issue will get fixed once we implement IOperation and CFG support for this feature.
I suspect this is a compiler issue, as the
AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer
relies on the control flow graph to determine how variables are used.FYI @mavasani
The text was updated successfully, but these errors were encountered: