Skip to content

Commit

Permalink
Use expression compiler on all code paths. Fixes 327
Browse files Browse the repository at this point in the history
  • Loading branch information
snikolayev committed Apr 22, 2023
1 parent e7ac060 commit b8c44a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NRules/NRules/Utilities/RuleExpressionCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ILhsFactExpression<TResult> CompileLhsFactExpression<TResult>(ExpressionE
{
var optimizedExpression = ExpressionOptimizer.Optimize<Func<Fact, TResult>>(
element.Expression, IndexMap.Unit, tupleInput: false, factInput: true);
var @delegate = optimizedExpression.Compile();
var @delegate = ExpressionCompiler.Compile(optimizedExpression);;
var argumentMap = new ArgumentMap(IndexMap.Unit, 1);
var expression = new LhsFactExpression<TResult>(element.Expression, @delegate, argumentMap);
return expression;
Expand Down

0 comments on commit b8c44a3

Please sign in to comment.