Skip to content

Commit 2333eb7

Browse files
committed
EqualsBlock - Compare variables by position
1 parent e5a21b0 commit 2333eb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ExpressionTreeToolkit.Core/ExpressionEqualityComparer.Block.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ protected virtual bool EqualsBlock([DisallowNull] BlockExpression x, [DisallowNu
2525
if (x == null) throw new ArgumentNullException(nameof(x));
2626
if (y == null) throw new ArgumentNullException(nameof(y));
2727
return x.Type == y.Type
28-
&& Equals(x.Expressions, y.Expressions)
2928
&& Equals(x.Variables, y.Variables, EqualsParameter)
30-
&& Equals(x.Result, y.Result);
29+
&& new ExpressionEqualityComparer(x.Variables, y.Variables).Equals(x.Expressions, y.Expressions)
30+
;
3131
}
3232

3333
/// <summary>Gets the hash code for the specified BlockExpression.</summary>

0 commit comments

Comments
 (0)