aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/unify.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/unify.cpp b/src/unify.cpp
index 278f3a5..dbc938f 100644
--- a/src/unify.cpp
+++ b/src/unify.cpp
@@ -136,9 +136,8 @@ unify(const Constraints& constraints)
else
cp.push_back(Constraint(st, tt, st->loc));
}
- if (si == s->end() && ti == t->end()
- || (*ti)->as<AType*>()->kind == AType::DOTS
- || (*si)->as<AType*>()->kind == AType::DOTS)
+ if (si == s->end() && (ti == t->end() || (*ti)->as<AType*>()->kind == AType::DOTS)
+ || ti == t->end() && (*si)->as<AType*>()->kind == AType::DOTS)
return unify(cp);
}
throw Error(s->loc ? s->loc : t->loc,