未验证 提交 a698120f 编写于 作者: M msftbot[bot] 提交者: GitHub

Merge pull request #42098 from CyrusNajmabadi/addTest7

Add test demonstrating issue is fixed.
......@@ -7328,5 +7328,43 @@ private static object Foo()
}
}", index: 1, options: ImplicitTypingEverywhere());
}
[WorkItem(12591, "https://github.com/dotnet/roslyn/issues/12591")]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsIntroduceVariable)]
public async Task TestWhitespaceSelection1()
{
await TestInRegularAndScriptAsync(
@"public class Class1
{
void M()
{
Foo(1,[| Bar()|]);
}
private void Foo(int v1, object v2)
{
}
private object Bar()
{
}
}",
@"public class Class1
{
void M()
{
object {|Rename:v2|} = Bar();
Foo(1, v2);
}
private void Foo(int v1, object v2)
{
}
private object Bar()
{
}
}");
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册