mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Have GenericFunctionType use GenericSignature.
Change GenericFunctionType to reference a GenericSignature instead of containing its generic parameters and requirements in-line, and clean up some interface type APIs that awkwardly returned ArrayRef pairs to instead return GenericSignatures instead. Swift SVN r13807
This commit is contained in:
@@ -1457,8 +1457,7 @@ Decl *ModuleFile::getDecl(DeclID DID, Optional<DeclContext *> ForcedContext,
|
||||
->castTo<MetatypeType>()->getInstanceType();
|
||||
if (auto polyFn = allocType->getAs<GenericFunctionType>()) {
|
||||
ctor->setInitializerInterfaceType(
|
||||
GenericFunctionType::get(polyFn->getGenericParams(),
|
||||
polyFn->getRequirements(),
|
||||
GenericFunctionType::get(polyFn->getGenericSignature(),
|
||||
selfTy, polyFn->getResult(),
|
||||
polyFn->getExtInfo()));
|
||||
} else {
|
||||
@@ -2595,8 +2594,8 @@ Type ModuleFile::getType(TypeID TID) {
|
||||
thin,
|
||||
noreturn);
|
||||
|
||||
typeOrOffset = GenericFunctionType::get(genericParams,
|
||||
requirements,
|
||||
auto sig = GenericSignature::get(genericParams, requirements, ctx);
|
||||
typeOrOffset = GenericFunctionType::get(sig,
|
||||
getType(inputID),
|
||||
getType(resultID),
|
||||
info);
|
||||
|
||||
Reference in New Issue
Block a user