mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Make DynamicSelf into its own special type node.
Making DynamicSelf its own special type node makes it easier to opt-in to the behavior we want rather than opting out of the behavior we don't want. Some things already work better with this representation, such as mangling and overriding; others are more broken, such as the handling of DynamicSelf within generic classes and the lookup of the DynamicSelf type. Swift SVN r13141
This commit is contained in:
@@ -698,7 +698,6 @@ ConstraintSystem::matchTypes(Type type1, Type type2, TypeMatchKind kind,
|
||||
case TypeKind::Tuple: {
|
||||
// Try the tuple-to-tuple conversion.
|
||||
potentialConversions.push_back(ConversionRestrictionKind::TupleToTuple);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -713,6 +712,10 @@ ConstraintSystem::matchTypes(Type type1, Type type2, TypeMatchKind kind,
|
||||
break;
|
||||
}
|
||||
|
||||
case TypeKind::DynamicSelf:
|
||||
// FIXME: Deep equality? What is the rule between two DynamicSelfs?
|
||||
break;
|
||||
|
||||
case TypeKind::Protocol:
|
||||
// Nothing to do here; try existential and user-defined conversions below.
|
||||
break;
|
||||
@@ -1083,6 +1086,7 @@ ConstraintSystem::simplifyConstructionConstraint(Type valueType, Type argType,
|
||||
case TypeKind::BoundGenericEnum:
|
||||
case TypeKind::BoundGenericStruct:
|
||||
case TypeKind::Archetype:
|
||||
case TypeKind::DynamicSelf:
|
||||
// Break out to handle the actual construction below.
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user