add newly created constraints to other end of constraint list in unification

This commit is contained in:
ucrhh 2021-02-11 21:54:52 +01:00
parent 72ed9bdc32
commit 337a88d8f4

View File

@ -52,7 +52,9 @@ public class Unification {
substitutions.add(substitution.get());
}
// add new constraints to the queue
constraints.addAll(thisStep.getConstraints());
for (Constraint constraint : thisStep.getConstraints()) {
constraints.addFirst(constraint);
}
steps.add(new UnificationStep(new Result<>(new ArrayList<>(substitutions)), new ArrayList<>(constraints)));
}