From 1c5b5bfc98f58a4cafc92ab0969c12515ac67e67 Mon Sep 17 00:00:00 2001 From: valis Date: Thu, 29 Feb 2024 23:41:18 +0300 Subject: [PATCH] Fix comparison of incomplete expressions --- .../java/org/arend/term/concrete/ConcreteCompareVisitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/src/main/java/org/arend/term/concrete/ConcreteCompareVisitor.java b/base/src/main/java/org/arend/term/concrete/ConcreteCompareVisitor.java index ab9582a6c..91403dcb4 100644 --- a/base/src/main/java/org/arend/term/concrete/ConcreteCompareVisitor.java +++ b/base/src/main/java/org/arend/term/concrete/ConcreteCompareVisitor.java @@ -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;