mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Replace GenericSignature::createGenericEnvironment() with getGenericEnvironment()
This memoizes the result, which is fine for all callers; the only exception is open existential types where each new open existential now explicitly gets a unique generic environment, allocated by calling GenericEnvironment::getIncomplete().
This commit is contained in:
@@ -453,7 +453,7 @@ configureGenericDesignatedInitOverride(ASTContext &ctx,
|
||||
std::move(requirements)
|
||||
},
|
||||
nullptr);
|
||||
genericEnv = genericSig->createGenericEnvironment();
|
||||
genericEnv = genericSig->getGenericEnvironment();
|
||||
} else {
|
||||
genericEnv = classDecl->getGenericEnvironment();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user