Skip to content

Commit 8679bda

Browse files
committed
🐛 Add hashCode and equals in Constant
1 parent a6a4e36 commit 8679bda

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/main/java/edu/wisc/cs/will/FOPC/Constant.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,16 @@ public Collection<Variable> collectFreeVariables(Collection<Variable> boundVaria
3131
return null;
3232
}
3333

34-
public boolean equals(Object other) {
35-
return (this == other);
34+
@Override
35+
public int hashCode() {
36+
return super.hashCode();
3637
}
37-
38+
39+
@Override
40+
public boolean equals(Object obj) {
41+
return super.equals(obj);
42+
}
43+
3844
public boolean containsVariables() {
3945
return false;
4046
}

0 commit comments

Comments
 (0)