dotnet/roslyn

Always true condition in LocalRewriter_Conversion.cs

Aberta

#17.839 aberto em 14 de mar. de 2017

 (3 comentários) (0 reação) (0 responsável)C# (4.257 forks)batch import
Area-CompilersBugConcept-Design Debthelp wanted

Métricas do repositório

Stars
 (20.414 estrelas)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (256 fundiu PRs em 30d)

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.

Guia do colaborador