private Expression GenerateCoalesce(Expression valueExpr, Expression ifNoneExpr, int errorPos)
{
if (!IsNullableType(valueExpr.Type) && valueExpr.Type != typeof(string))
{
throw ParseError(errorPos, Res.TypeHasNoNullableFormAndIsNotString(valueExpr.Type.Name, KEYWORD_IFNONE, 1));
}
if (!IsNumericType(ifNoneExpr.Type) && ifNoneExpr.Type != typeof(bool) && ifNoneExpr.Type != typeof(string))
{
throw ParseError(errorPos, Res.SimpleTypeExpected(ifNoneExpr.Type.Name, KEYWORD_IFNONE, 2));
}
return EqualizeTypesAndCombine(valueExpr, ifNoneExpr, errorPos, Expression.Coalesce);
}