Further changes to fix bug with 'incorrect number of lambda paramters' issue with .Where when using && and ||

This commit is contained in:
agrath
2011-07-26 14:02:25 -12:00
parent c354acb388
commit e72bd130e3

View File

@@ -2444,9 +2444,9 @@ namespace System.Linq.Dynamic
return (Expression.Lambda<Func<DynamicNode, Boolean>>(Expression.AndAlso(finalLeft, finalRight), parameters));
}
case ExpressionType.OrElse:
if (leftIsLambda && rightIsLambda && sequenceEqual)
if (leftIsLambda && rightIsLambda && sequenceEqual || (!leftIsLambda && !rightIsLambda))
{
return Expression.Equal(left, right);
return Expression.OrElse(left, right);
}
else
{