summaryrefslogtreecommitdiff
path: root/Source/VCExpr/VCExprAST.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Source/VCExpr/VCExprAST.cs')
-rw-r--r--Source/VCExpr/VCExprAST.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/VCExpr/VCExprAST.cs b/Source/VCExpr/VCExprAST.cs
index 89c615ad..74505150 100644
--- a/Source/VCExpr/VCExprAST.cs
+++ b/Source/VCExpr/VCExprAST.cs
@@ -664,7 +664,6 @@ namespace Microsoft.Boogie.VCExprAST {
return !ib.MoveNext();
}
}
- return true;
}
public static int PolyHash(int init, int factor, IEnumerable a) {
@@ -1505,6 +1504,14 @@ namespace Microsoft.Boogie.VCExprAST {
return false;
return this.Name == t.Name && this.arity == t.arity && this.Type == t.Type;
}
+ [Pure]
+ [Reads(ReadsAttribute.Reads.Nothing)]
+ public override int GetHashCode() {
+ int h = Name.GetHashCode();
+ h = 7823 * h + arity;
+ h = 7823 * h + Type.GetHashCode();
+ return h;
+ }
public override int Arity {
get {
return arity;