2
Vote

Possible bug in ExpressionPropertyAnalyzer.AnalyzeLambda

description

The for-loop in the ExpressionPropertyAnalyzer.AnalyzeLambda lambda method looks suspicious to me:
 
        for (int i = 0; i < expression.Parameters.Count; i++)
        {
            ParameterExpression parameterExpression = expression.Parameters[0];
            tree.Children.Add(new ParameterNode(parameterExpression.Type, parameterExpression.Name));
        }
 
Shouldn't the line
 
            ParameterExpression parameterExpression = expression.Parameters[0];
 
be changed to:
 
            ParameterExpression parameterExpression = expression.Parameters[i];

comments