dotnet/roslyn

Always true condition in LocalRewriter_Conversion.cs

Open

#17,839 创建于 2017年3月14日

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

描述

Hi there,

On the latest code, the line 23 of LocalRewriter_Conversion.cs contains one bit (&& !wasInExpressionLambda) which is always true and so can be safely removed. Indeed because of the short-circuit if the right part of the expression is reached that means that wasInExpressionLambda is false so !wasInExpressionLambda is always true.

贡献者指南

Always true condition in LocalRewriter_Conversion.cs · dotnet/roslyn#17839 | Good First Issue