mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user