Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/FastExpressionCompiler.LightExpression/Expression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,18 @@ public abstract class BinaryExpression : Expression
protected BinaryExpression(ExpressionType nodeType, Expression left, Expression right, Type type)
{
NodeType = nodeType;
Type = type;

Left = left;
Right = right;

if (nodeType == ExpressionType.Equal || nodeType == ExpressionType.NotEqual ||
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to move this check to specific BE non-abstract implementor. But let's that be, will optimize later.

nodeType == ExpressionType.GreaterThan || nodeType == ExpressionType.GreaterThanOrEqual ||
nodeType == ExpressionType.LessThan || nodeType == ExpressionType.LessThanOrEqual)
{
Type = typeof(bool);
}
else
Type = type;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<Compile Include="..\FastExpressionCompiler.IssueTests\**\*.cs" Exclude="..\FastExpressionCompiler.IssueTests\obj\**\*.*" />

<Compile Remove="..\FastExpressionCompiler.IssueTests\ObjectMethodExecutor\**" />
<Compile Remove="..\FastExpressionCompiler.IssueTests\Issue14_String_constant_comparisons_fail.cs" />
<Compile Remove="..\FastExpressionCompiler.IssueTests\Issue67_Equality_comparison_with_nullables_throws_at_delegate_invoke.cs" />
<Compile Remove="..\FastExpressionCompiler.IssueTests\Issue72_Try_CompileFast_for_MS_Extensions_ObjectMethodExecutor.cs" />
<Compile Remove="..\FastExpressionCompiler.IssueTests\NServiceBus_PipelineExecutionExtensions.cs" />
Expand Down