mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Record the protocols and superclass for generic parameters.
This allows us to use getProtocols() rather than getInherited() wherever we're dealing with generic parameters and associated types. Swift SVN r6683
This commit is contained in:
@@ -716,11 +716,13 @@ Decl *ModuleFile::getDecl(DeclID DID, Optional<DeclContext *> ForcedContext,
|
||||
TypeID underlyingTypeID;
|
||||
bool isGeneric;
|
||||
bool isImplicit;
|
||||
TypeID superclassTypeID;
|
||||
ArrayRef<uint64_t> inheritedIDs;
|
||||
|
||||
decls_block::TypeAliasLayout::readRecord(scratch, nameID, contextID,
|
||||
underlyingTypeID,
|
||||
isGeneric, isImplicit,
|
||||
superclassTypeID,
|
||||
inheritedIDs);
|
||||
|
||||
auto inherited =
|
||||
@@ -754,8 +756,10 @@ Decl *ModuleFile::getDecl(DeclID DID, Optional<DeclContext *> ForcedContext,
|
||||
|
||||
if (isImplicit)
|
||||
alias->setImplicit();
|
||||
if (isGeneric)
|
||||
if (isGeneric) {
|
||||
alias->setGenericParameter();
|
||||
alias->setSuperclass(getType(superclassTypeID));
|
||||
}
|
||||
|
||||
CanType canBaseTy = underlyingType.getType()->getCanonicalType();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user