dotnet/roslyn

Always true condition in LocalRewriter_Conversion.cs

オープン

#17,839 opened on 2017/03/14

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)C# (4,257 件のフォーク)batch import
Area-CompilersBugConcept-Design Debthelp wanted

Repository metrics

Stars
 (20,414 個のスター)
PR merge metrics
 (平均マージ 6d 17h) (30d で 256 merged PRs)

説明

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.

コントリビューターガイド