From f598e5d4b3463ffbd8eeab38f02051049c94061c Mon Sep 17 00:00:00 2001 From: dadhi Date: Thu, 30 Aug 2018 08:55:17 +0000 Subject: [PATCH] changed: LE.ParameterExpression back to array in LambdaExpression in regards to #116 --- src/FastExpressionCompiler.LightExpression/Expression.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/FastExpressionCompiler.LightExpression/Expression.cs b/src/FastExpressionCompiler.LightExpression/Expression.cs index 9dc3e99c..fbac8154 100644 --- a/src/FastExpressionCompiler.LightExpression/Expression.cs +++ b/src/FastExpressionCompiler.LightExpression/Expression.cs @@ -170,8 +170,7 @@ public static Expression Divide(Expression left, Expression right) => new ArithmeticBinaryExpression(ExpressionType.Divide, left, right, left.Type); public static BlockExpression Block(params Expression[] expressions) => - new BlockExpression(expressions[expressions.Length - 1].Type, - Tools.Empty(), expressions); + new BlockExpression(expressions[expressions.Length - 1].Type, Tools.Empty(), expressions); public static TryExpression TryCatch(Expression body, params CatchBlock[] handlers) => new TryExpression(body, null, handlers); @@ -665,14 +664,14 @@ public class LambdaExpression : Expression public Type ReturnType => Body.Type; public readonly Expression Body; - public readonly IReadOnlyList Parameters; + public readonly ParameterExpression[] Parameters; public override SysExpr ToExpression() => ToLambdaExpression(); public System.Linq.Expressions.LambdaExpression ToLambdaExpression() => SysExpr.Lambda(Body.ToExpression(), Parameters.Map(p => p.ParamExpr)); - internal LambdaExpression(Type delegateType, Expression body, IReadOnlyList parameters) + internal LambdaExpression(Type delegateType, Expression body, ParameterExpression[] parameters) { Body = body; Parameters = parameters;