Skip to content

Commit ce5bef8

Browse files
authored
Merge pull request #65361 from slavapestov/sil-type-subst-cloner-sillyness
SIL: TypeSubstCloner::remapASTType() should not call getLoweredRValueType()
2 parents 8f3191a + 8bb3248 commit ce5bef8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/swift/SIL/TypeSubstCloner.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ class TypeSubstCloner : public SILClonerWithScopes<ImplClass> {
187187
.shouldLookThroughOpaqueTypeArchetypes())
188188
return substTy;
189189
// Remap types containing opaque result types in the current context.
190-
return getBuilder().getModule().Types.getLoweredRValueType(
191-
TypeExpansionContext(getBuilder().getFunction()), substTy);
190+
return substOpaqueTypesWithUnderlyingTypes(
191+
substTy,
192+
TypeExpansionContext(getBuilder().getFunction()),
193+
/*allowLoweredTypes=*/false);
192194
}
193195

194196
ProtocolConformanceRef remapConformance(Type ty,

0 commit comments

Comments
 (0)