mirror of
https://github.com/Z3Prover/z3
synced 2025-04-26 02:25:32 +00:00
Fixed .equals for AST, FuncDecl, and Sort, and AST.compareTo in Java
Fixes #143
This commit is contained in:
parent
5f755a5bd8
commit
1bad614646
3 changed files with 21 additions and 26 deletions
|
@ -25,8 +25,6 @@ import com.microsoft.z3.enumerations.Z3_sort_kind;
|
|||
**/
|
||||
public class Sort extends AST
|
||||
{
|
||||
/* Overloaded operators are not translated. */
|
||||
|
||||
/**
|
||||
* Equality operator for objects of type Sort.
|
||||
* @param o
|
||||
|
@ -42,7 +40,12 @@ public class Sort extends AST
|
|||
return false;
|
||||
}
|
||||
|
||||
return this.getNativeObject() == casted.getNativeObject();
|
||||
return
|
||||
(this == casted) ||
|
||||
(this != null) &&
|
||||
(casted != null) &&
|
||||
(getContext().nCtx() == casted.getContext().nCtx()) &&
|
||||
(Native.isEqSort(getContext().nCtx(), getNativeObject(), casted.getNativeObject()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue