提交 a8d26579 编写于 作者: A AlekseyTs

Adjust implementation of...

Adjust implementation of SyntaxTreeExtensions.IsLocalVariableDeclarationContext around Out Variable Declarations.

Fixes #12121.
上级 b7e9a083
......@@ -232,5 +232,13 @@ public async Task TestNotAfterConstField()
@"class C {
const $$");
}
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
[WorkItem(12121, "https://github.com/dotnet/roslyn/issues/12121")]
public async Task TestAfterOutKeywordInArgument()
{
await VerifyKeywordAsync(AddInsideMethod(
@"M(out $$"));
}
}
}
......@@ -1201,7 +1201,7 @@ public static bool IsParameterTypeContext(this SyntaxTree syntaxTree, int positi
if (token.IsKind(SyntaxKind.OutKeyword) &&
token.Parent.IsKind(SyntaxKind.Argument) &&
((ArgumentSyntax)token.Parent).Declaration != null)
((ArgumentSyntax)token.Parent).RefOrOutKeyword == token)
{
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册