From cbabeb3fdef4f1ad2aed7f32ba375ad4fdd6c298 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Mon, 28 Jul 2014 16:32:51 +0100 Subject: Fix bug in NAryExpr where Equals() override was not correctly implemented. The previous implementation which called object.Equals(this.Args, other.Args) would in turn call ``this.Args.Equals(others.Args)`` which for List<> is reference equality. Equals() is purposely overloaded on Expr classes in Boogie to provide structural equality so this has been fixed so a comparision of elements in the list is performed. --- Source/Core/AbsyExpr.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/Core/AbsyExpr.cs b/Source/Core/AbsyExpr.cs index bc603ea5..0a7bfa33 100644 --- a/Source/Core/AbsyExpr.cs +++ b/Source/Core/AbsyExpr.cs @@ -2110,7 +2110,7 @@ namespace Microsoft.Boogie { return false; NAryExpr other = (NAryExpr)obj; - return object.Equals(this.Fun, other.Fun) && object.Equals(this.Args, other.Args); + return object.Equals(this.Fun, other.Fun) && this.Args.SequenceEqual(other.Args); } [Pure] public override int GetHashCode() { -- cgit v1.2.3