From 15e654e07d95989dad55850db7f58a04fb3c1a95 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Sun, 1 Mar 2020 20:00:40 -0800 Subject: [PATCH] Add test to validate proper intellisense. --- .../VarKeywordRecommenderTests.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/EditorFeatures/CSharpTest2/Recommendations/VarKeywordRecommenderTests.cs b/src/EditorFeatures/CSharpTest2/Recommendations/VarKeywordRecommenderTests.cs index 80af9495018..bf0339c272f 100644 --- a/src/EditorFeatures/CSharpTest2/Recommendations/VarKeywordRecommenderTests.cs +++ b/src/EditorFeatures/CSharpTest2/Recommendations/VarKeywordRecommenderTests.cs @@ -418,5 +418,27 @@ public async Task TestNotAfterRefExpression() await VerifyAbsenceAsync(AddInsideMethod( @"ref int x = ref $$")); } + + [WorkItem(10170, "https://github.com/dotnet/roslyn/issues/10170")] + [Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)] + public async Task TestInPropertyPattern() + { + await VerifyKeywordAsync( +@" +using System; + +class Person { public string Name; } + +class Program +{ + void Goo(object o) + { + if (o is Person { Name: $$ }) + { + Console.WriteLine(n); + } + } +}"); + } } } -- GitLab