Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

Fixes #34107

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner December 2, 2024 05:48
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 2, 2024
containsForEachStatement = containsForEachStatement || syntaxFacts.IsForEachStatement(node);
containsLockStatement = containsLockStatement || syntaxFacts.IsLockStatement(node);
containsUsingStatement = containsUsingStatement || syntaxFacts.IsUsingStatement(node);
containsUsingStatement = containsUsingStatement || syntaxFacts.IsUsingStatement(node) || syntaxFacts.IsUsingLocalDeclarationStatement(node);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsUsingLocalDeclarationStatement

To clarify for me, this is tracking both "using namespace" and "using var foo = IDisposable" statements, right? Other than the name being the same, why are they grouped together?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify for me, this is tracking both "using namespace" and "using var foo = IDisposable" statements, right?

Yes.

Other than the name being the same, why are they grouped together?

Because this is for FindRefs, which only cares about tthis info just to say "should i look for Dispose references here?". And for FindRefs, it doesn't care about which of the two cases it is.

I could do this as two different bools, but the consumption side would then have to check for both. So i just collapse here to one bool since htat's all we need.

@CyrusNajmabadi CyrusNajmabadi merged commit c1c1c0b into dotnet:main Dec 3, 2024
25 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the findRefsDispose branch December 3, 2024 20:05
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Dec 3, 2024
@dibarbet dibarbet modified the milestones: Next, 17.13 P3 Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find All References does not support using statements

3 participants