dotnet/roslyn

Inline temporary variable with multiple assignments

Open

#34,753 创建于 2019年4月4日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)C# (20,414 star) (4,257 fork)batch import
Area-IDEBugIDE-CodeStylehelp wanted

描述

Version Used: Visual Studio 2019 version 16.0

Steps to Reproduce:

var x = 3;
x = x + 2;
Console.WriteLine(x);

Apply Inline temporary variable on the definition of x.

Expected Behavior:

var x = 3 + 2;
Console.WriteLine(x);

Actual Behavior:

var x = 3;
x = 3 + 2;
Console.WriteLine(3);

贡献者指南