Skip to content

Commit

Permalink
Fix comparison of incomplete expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
valis committed Feb 29, 2024
1 parent 44d1ad0 commit 1c5b5bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public Boolean visitHole(Concrete.HoleExpression expr1, Concrete.Expression expr

@Override
public Boolean visitGoal(Concrete.GoalExpression expr1, Concrete.Expression expr2) {
if (!(expr2 instanceof Concrete.GoalExpression goalExpr2)) return false;
if (!(expr2 instanceof Concrete.GoalExpression goalExpr2) || (expr1 instanceof Concrete.IncompleteExpression) != (expr2 instanceof Concrete.IncompleteExpression)) return false;
if ((expr1.getName() == null) != (goalExpr2.getName() == null) || expr1.useGoalSolver != goalExpr2.useGoalSolver || (expr1.originalExpression == null) != (goalExpr2.originalExpression == null) || (expr1.expression == null) != (goalExpr2.expression == null)) return false;
if (expr1.getName() != null && !expr1.getName().equals(goalExpr2.getName())) return false;
if (expr1.expression != null && !expr1.expression.accept(this, goalExpr2.expression)) return false;
Expand Down

0 comments on commit 1c5b5bf

Please sign in to comment.