Various minor TypeExpr improvements:

- Change astdumper to print the typerepr in the more canonical syntax.
 - Remove bogus logic from CSApply that was preventing us from rewriting
   TypeExprs properly
 - Teach CSGen to handle unbound generics correctly (thanks to Doug for the help on this)



Swift SVN r17007
This commit is contained in:
Chris Lattner
2014-04-29 02:58:43 +00:00
parent 54eb58bbd8
commit 29aca1c851
4 changed files with 8 additions and 15 deletions

View File

@@ -1811,14 +1811,14 @@ ConstraintSystem::simplifyDynamicTypeOfConstraint(const Constraint &constraint)
// If we have an existential metatype, that's good enough to solve
// the constraint.
if (auto metatype1 = type1->getAs<ExistentialMetatypeType>()) {
if (auto metatype1 = type1->getAs<ExistentialMetatypeType>())
return matchTypes(metatype1->getInstanceType(), type2,
TypeMatchKind::BindType,
TMF_GenerateConstraints, constraint.getLocator());
// If we have a normal metatype, we can't solve backwards unless we
// know what kind of object it is.
} else if (auto metatype1 = type1->getAs<MetatypeType>()) {
if (auto metatype1 = type1->getAs<MetatypeType>()) {
TypeVariableType *instanceTypeVar1;
Type instanceType1 = getFixedTypeRecursive(metatype1->getInstanceType(),
instanceTypeVar1, true);