[ConstraintSystem] Another small simplification.

This commit is contained in:
Mark Lacey
2018-07-27 20:31:16 -07:00
parent b900b5df0b
commit 4ac4d42b37

View File

@@ -2022,12 +2022,10 @@ Type ConstraintSystem::simplifyType(Type type) {
return simplifyTypeImpl(
*this, type,
[&](TypeVariableType *tvt) -> Type {
tvt = getRepresentative(tvt);
if (auto fixed = getFixedType(tvt)) {
if (auto fixed = getFixedType(tvt))
return simplifyType(fixed);
}
return tvt;
return getRepresentative(tvt);
});
}