dotnet/roslyn

Always true condition in LocalRewriter_Conversion.cs

开放

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

 (3 条评论) (0 个反应) (0 位负责人)C# (4,257 个派生)batch import
Area-CompilersBugConcept-Design Debthelp wanted

仓库指标

星标
 (20,414 个星标)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

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.

贡献者指南