It looks like FastExpressionCompiler is not comparing correctly nullable types. I didn't find any mention of it.
public static class FastExpressionCompilerTests
{
public class Test
{
public decimal? D1 { get; set; }
}
public static void RunTest()
{
Expression<Func<Test, bool>> expression = t => t.D1 < 20;
var normalCompiled = expression.Compile();
var fastCompiled = expression.CompileFast(true, CompilerFlags.EnableDelegateDebugInfo);
var test = new Test()
{
D1 = null
};
var result1 = normalCompiled(test); // false
var result2 = fastCompiled(test); // true
}
}
after execution result1 is equal false, but result2 is equal true
Hi,
It looks like FastExpressionCompiler is not comparing correctly nullable types. I didn't find any mention of it.
after execution result1 is equal false, but result2 is equal true