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.

貢獻者指南