remove uncessary variable

This commit is contained in:
Andreas Stadelmeier 2022-05-17 12:22:21 +02:00
parent 58261b1fc4
commit a24faf8f2d

View File

@ -35,12 +35,11 @@ object Unify {
}
def subElimRule(eq: Set[UnifyConstraint]) : Option[Set[UnifyConstraint]] = {
var ret = eq
eq.find(_ match{
case UnifyLessDot(UnifyTV(a), UnifyTV(b)) => true
case _ => false
}).map(it => {
subst(it.right.asInstanceOf[UnifyTV], it.left, ret.filter(it != _)) ++ Set(UnifyEqualsDot(it.right, it.left), UnifyEqualsDot(it.left, it.left))
subst(it.right.asInstanceOf[UnifyTV], it.left, eq.filter(it != _)) ++ Set(UnifyEqualsDot(it.right, it.left), UnifyEqualsDot(it.left, it.left))
})
}