File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -254,13 +254,10 @@ class SILCloner : protected SILInstructionVisitor<ImplClass> {
254254 assert (archetypeTy->isRoot ());
255255
256256 auto sig = Builder.getFunction ().getGenericSignature ();
257- auto existentialTy = archetypeTy->getExistentialType ()->getCanonicalType ();
258- auto env = GenericEnvironment::forOpenedExistential (
259- getOpASTType (existentialTy), sig, UUID::fromTime ());
260- auto interfaceTy = OpenedArchetypeType::getSelfInterfaceTypeFromContext (sig, existentialTy->getASTContext ());
261- auto replacementTy =
262- env->mapTypeIntoContext (interfaceTy)
263- ->template castTo <OpenedArchetypeType>();
257+ auto origExistentialTy = archetypeTy->getExistentialType ()
258+ ->getCanonicalType ();
259+ auto substExistentialTy = getOpASTType (origExistentialTy);
260+ auto replacementTy = OpenedArchetypeType::get (substExistentialTy, sig);
264261 registerOpenedExistentialRemapping (archetypeTy, replacementTy);
265262 }
266263
You can’t perform that action at this time.
0 commit comments