@@ -3937,8 +3937,7 @@ GenericEnvironment *OpenedArchetypeType::getGenericEnvironment() const {
3937
3937
auto thisType = Type (const_cast <OpenedArchetypeType*>(this ));
3938
3938
auto &ctx = thisType->getASTContext ();
3939
3939
// Create a generic environment to represent the opened type.
3940
- auto signature =
3941
- ctx.getOpenedArchetypeSignature (Opened->getCanonicalType (), nullptr );
3940
+ auto signature = ctx.getOpenedArchetypeSignature (Opened);
3942
3941
auto *builder = signature->getGenericSignatureBuilder ();
3943
3942
auto *env = GenericEnvironment::getIncomplete (signature, builder);
3944
3943
env->addMapping (signature->getGenericParams ()[0 ], thisType);
@@ -4567,9 +4566,10 @@ CanGenericSignature ASTContext::getSingleGenericParameterSignature() const {
4567
4566
// Type::getExistentialLayout()). In particular, the opened archetype signature
4568
4567
// does not have requirements for conformances inherited from superclass
4569
4568
// 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 ();
4573
4573
4574
4574
// The opened archetype signature for a protocol type is identical
4575
4575
// to the protocol's own canonical generic signature.
0 commit comments