@@ -3937,8 +3937,7 @@ GenericEnvironment *OpenedArchetypeType::getGenericEnvironment() const {
39373937 auto thisType = Type (const_cast <OpenedArchetypeType*>(this ));
39383938 auto &ctx = thisType->getASTContext ();
39393939 // Create a generic environment to represent the opened type.
3940- auto signature =
3941- ctx.getOpenedArchetypeSignature (Opened->getCanonicalType (), nullptr );
3940+ auto signature = ctx.getOpenedArchetypeSignature (Opened);
39423941 auto *builder = signature->getGenericSignatureBuilder ();
39433942 auto *env = GenericEnvironment::getIncomplete (signature, builder);
39443943 env->addMapping (signature->getGenericParams ()[0 ], thisType);
@@ -4567,9 +4566,10 @@ CanGenericSignature ASTContext::getSingleGenericParameterSignature() const {
45674566// Type::getExistentialLayout()). In particular, the opened archetype signature
45684567// does not have requirements for conformances inherited from superclass
45694568// constraints while existential values do.
4570- CanGenericSignature ASTContext::getOpenedArchetypeSignature (CanType existential,
4571- ModuleDecl *mod) {
4572- assert (existential.isExistentialType ());
4569+ CanGenericSignature ASTContext::getOpenedArchetypeSignature (Type type) {
4570+ assert (type->isExistentialType ());
4571+
4572+ const CanType existential = type->getCanonicalType ();
45734573
45744574 // The opened archetype signature for a protocol type is identical
45754575 // to the protocol's own canonical generic signature.
0 commit comments