diff --git a/src/EditorFeatures/CSharpTest/Recommendations/PublicKeywordRecommenderTests.cs b/src/EditorFeatures/CSharpTest/Recommendations/PublicKeywordRecommenderTests.cs index 4b2ddc1ed4f8251bf150e5a1688d2a857b706ee1..93a17852ddf3cbbee7f9bb0fea82ad03e7669f37 100644 --- a/src/EditorFeatures/CSharpTest/Recommendations/PublicKeywordRecommenderTests.cs +++ b/src/EditorFeatures/CSharpTest/Recommendations/PublicKeywordRecommenderTests.cs @@ -183,7 +183,7 @@ public void InsideStruct() [Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)] public void InsideInterface() { - VerifyKeyword( + VerifyAbsence( @"interface I { $$"); } diff --git a/src/Features/CSharp/Completion/KeywordRecommenders/PublicKeywordRecommender.cs b/src/Features/CSharp/Completion/KeywordRecommenders/PublicKeywordRecommender.cs index 80c47fec459b6d4f229f7ab5702ddf94248b4164..cdba6d3bc5a72a2fc91293449e049638e88f471d 100644 --- a/src/Features/CSharp/Completion/KeywordRecommenders/PublicKeywordRecommender.cs +++ b/src/Features/CSharp/Completion/KeywordRecommenders/PublicKeywordRecommender.cs @@ -26,7 +26,7 @@ private static bool IsValidContextForMember(CSharpSyntaxContext context, Cancell if (context.SyntaxTree.IsGlobalMemberDeclarationContext(context.Position, SyntaxKindSet.AllGlobalMemberModifiers, cancellationToken) || context.IsMemberDeclarationContext( validModifiers: SyntaxKindSet.AllMemberModifiers, - validTypeDeclarations: SyntaxKindSet.ClassInterfaceStructTypeDeclarations, + validTypeDeclarations: SyntaxKindSet.ClassStructTypeDeclarations, canBePartial: false, cancellationToken: cancellationToken)) {