-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix DeclarationKind layering #79009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DeclarationKind layering #79009
Conversation
| case SyntaxKind.VariableDeclarator: | ||
| var declarationKind = GetDeclarationKind(declaration); | ||
| return declarationKind is DeclarationKind.Field or DeclarationKind.Event; | ||
| return declaration.Parent is VariableDeclarationSyntax { Parent: BaseFieldDeclarationSyntax }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we were pulling in an entire helper method, which had dependencies on a workspace enum, into this non-workspace-layer helper.
Untangled that, so that we don't need to try to make this enum available in two layers (esp. as it is already public)..
| public override DeclarationKind GetDeclarationKind(SyntaxNode declaration) | ||
| => CSharpAccessibilityFacts.GetDeclarationKind(declaration); | ||
| { | ||
| switch (declaration.Kind()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move. no logic touched at all.
| <InternalsVisibleTo Include="Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Compile Include="..\..\..\Workspaces\Core\Portable\Editing\DeclarationKind.cs" Link="Editing\DeclarationKind.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and there was much rejoicing.
No description provided.