-
-
Notifications
You must be signed in to change notification settings - Fork 92
Closed
Description
If you compare "null" without type info, for example with a string, this could not be compiled
[Test]
public void ConditionTest()
{
var pParam = Expression.Parameter(typeof(string), "p");
var condition = Expression.Condition(Expression.NotEqual(pParam, Expression.Constant(null)),
Expression.Constant(1),
Expression.Constant(0));
var lambda = Expression.Lambda<Func<string, int>>(condition, pParam);
var convert0 = lambda.Compile();
Assert.NotNull(convert0);
var convert1 = FastExpressionCompiler.ExpressionCompiler.CompileFast(lambda, true);
Assert.NotNull(convert1);
}