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
4 changes: 2 additions & 2 deletions src/Ramstack.ExpressionParser/ExpressionBuilder.Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private static Type ApplyConditionalConversions(Expr.Conditional expr, ref Expre
}

Error.NonApplicableConditionalOperator(ifTrue.Type, ifFalse.Type);
return null!;
return null;

static bool CanBeNull(Type type) =>
!type.IsValueType || type.IsNullable();
Expand Down Expand Up @@ -223,7 +223,7 @@ private static BinaryExpression ApplyNullCoalescing(Identifier op, Expression lh
}

Error.NonApplicableBinaryOperator(op, lhsType, rhsType);
return null!;
return null;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Ramstack.ExpressionParser/ExpressionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void Flatten(Expression e)
Error.NonApplicableBinaryOperator(expr.Operator, lhsType, rhsType);
}

return null!;
return null;

static Type GetNullLiteralType(Identifier op, Type operandType) =>
op.Name == "+" && operandType.GetNonNullableType() is { IsEnum: true } enumType
Expand Down