Skip to content

Commit

Permalink
Fixed compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed Jan 28, 2024
1 parent b5b54ec commit eb50f25
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using static System.Diagnostics.Debug;
using static System.Linq.Enumerable;

namespace DotNext.Runtime.CompilerServices;
Expand Down Expand Up @@ -457,7 +456,7 @@ private static MemberExpression GetStateField(ParameterExpression stateMachine)

private Expression<TDelegate> Build(LambdaExpression stateMachineMethod)
{
Assert(stateMachine is not null);
Debug.Assert(stateMachine is not null);
var stateVariable = Expression.Variable(GetStateField(stateMachine).Type);
var parameters = methodBuilder.Parameters;
ICollection<Expression> newBody = new LinkedList<Expression>();
Expand Down Expand Up @@ -550,7 +549,7 @@ private static MemberExpression[] CreateStateHolderType(Type returnType, bool us
slots = builder.Build<MemberExpression>(sm.Build, out _);
}

Assert(sm.StateMachine is not null);
Debug.Assert(sm.StateMachine is not null);
stateMachine = sm.StateMachine;
return slots;
}
Expand Down Expand Up @@ -583,7 +582,7 @@ protected override Expression VisitParameter(ParameterExpression node)

protected override Expression VisitExtension(Expression node)
{
Assert(stateMachine is not null);
Debug.Assert(stateMachine is not null);
return node switch
{
StatePlaceholderExpression placeholder => placeholder.Reduce(),
Expand Down

0 comments on commit eb50f25

Please sign in to comment.