mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: Use interface types to implement the PolymorphicConvention.
Refactor the base PolymorphicConvention implementation to work using generic signatures and dependent types instead of GenericParamLists and archetypes, using an ArchetypeBuilder to produce representative archetypes as a convenience when we need to consider all of the requirements attached to a dependent type. In EmitPolymorphicParameters, map the dependent types into context to resolve the archetypes that should be bound in the body of the function. Swift SVN r13685
This commit is contained in:
@@ -427,9 +427,10 @@ ArrayRef<Substitution> BoundGenericType::getSubstitutions(
|
||||
assert(type && "Unable to perform type substitution");
|
||||
|
||||
SmallVector<ProtocolConformance *, 4> conformances;
|
||||
if (type->is<TypeVariableType>()) {
|
||||
// If the type is a type variable, just fill in null conformances.
|
||||
// FIXME: It seems like we should record these as requirements (?).
|
||||
if (type->is<TypeVariableType>() || type->isDependentType()) {
|
||||
// If the type is a type variable or is dependent, just fill in null
|
||||
// conformances. FIXME: It seems like we should record these as
|
||||
// requirements (?).
|
||||
conformances.assign(archetype->getConformsTo().size(), nullptr);
|
||||
} else {
|
||||
// Find the conformances.
|
||||
|
||||
Reference in New Issue
Block a user