提交 37f9747c 编写于 作者: Š Šimon Koníček

Fixing (removing) suggestion mode after declaration pattern

上级 728ee14b
......@@ -153,5 +153,26 @@ public void False1()
{
VerifyFalse(AddInsideMethod(@"var $$"));
}
[WorkItem(25084, "https://github.com/dotnet/roslyn/issues/25084#issuecomment-369075537")]
[Fact, Trait(Traits.Feature, Traits.Features.Completion)]
public void FalseAfterPattern1()
{
VerifyFalse(AddInsideMethod(@"if (1 is int i $$"));
}
[WorkItem(25084, "https://github.com/dotnet/roslyn/issues/25084#issuecomment-369075537")]
[Fact, Trait(Traits.Feature, Traits.Features.Completion)]
public void FalseAfterPattern2()
{
VerifyFalse(AddInsideMethod(@"if (1 is int i $$);"));
}
[WorkItem(25084, "https://github.com/dotnet/roslyn/issues/25084#issuecomment-369075537")]
[Fact, Trait(Traits.Feature, Traits.Features.Completion)]
public void FalseAfterPattern3()
{
VerifyFalse(AddInsideMethod(@"switch (1) { case int i $$ }"));
}
}
}
......@@ -1322,7 +1322,8 @@ public static bool IsPossibleTupleOpenParenOrComma(SyntaxToken possibleCommaOrPa
// The well-formed cases:
// var ($$, y) = e;
// (var $$, var y) = e;
if (leftToken.Parent.IsKind(SyntaxKind.SingleVariableDesignation, SyntaxKind.ParenthesizedVariableDesignation))
if (leftToken.Parent.IsKind(SyntaxKind.ParenthesizedVariableDesignation) ||
leftToken.Parent.IsParentKind(SyntaxKind.ParenthesizedVariableDesignation))
{
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册