dotnet/roslyn

Always true condition in LocalRewriter_Conversion.cs

Ouverte

#17 839 ouverte le 14 mars 2017

 (3 commentaires) (0 réaction) (0 personne assignée)C# (4 257 forks)batch import
Area-CompilersBugConcept-Design Debthelp wanted

Métriques du dépôt

Stars
 (20 414 étoiles)
Métriques de merge PR
 (Merge moyen 6j 17h) (256 PRs mergées en 30 j)

Description

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.

Guide contributeur