mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Parameterize the resolution of generic type parameter types to archetypes.
When type checking, allow the caller to customize the resolution of generic type parameter types based on the context, for example, by choosing to substitute in an archetype (or not) and allowing one to resolve a dependent member reference via a specific archetype. No actual functionality change here. Swift SVN r8797
This commit is contained in:
@@ -1898,12 +1898,14 @@ Type ModuleFile::getType(TypeID TID) {
|
||||
|
||||
case decls_block::DEPENDENT_MEMBER_TYPE: {
|
||||
TypeID baseID;
|
||||
IdentifierID nameID;
|
||||
DeclID assocTypeID;
|
||||
|
||||
decls_block::DependentMemberTypeLayout::readRecord(scratch, baseID, nameID);
|
||||
typeOrOffset = DependentMemberType::get(getType(baseID),
|
||||
getIdentifier(nameID),
|
||||
ctx);
|
||||
decls_block::DependentMemberTypeLayout::readRecord(scratch, baseID,
|
||||
assocTypeID);
|
||||
typeOrOffset = DependentMemberType::get(
|
||||
getType(baseID),
|
||||
cast<AssociatedTypeDecl>(getDecl(assocTypeID)),
|
||||
ctx);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user