Skip to content

Commit

Permalink
Merge pull request swiftlang#65361 from slavapestov/sil-type-subst-cl…
Browse files Browse the repository at this point in the history
…oner-sillyness

SIL: TypeSubstCloner::remapASTType() should not call getLoweredRValueType()
  • Loading branch information
slavapestov committed Apr 21, 2023
2 parents 8f3191a + 8bb3248 commit ce5bef8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/swift/SIL/TypeSubstCloner.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ class TypeSubstCloner : public SILClonerWithScopes<ImplClass> {
.shouldLookThroughOpaqueTypeArchetypes())
return substTy;
// Remap types containing opaque result types in the current context.
return getBuilder().getModule().Types.getLoweredRValueType(
TypeExpansionContext(getBuilder().getFunction()), substTy);
return substOpaqueTypesWithUnderlyingTypes(
substTy,
TypeExpansionContext(getBuilder().getFunction()),
/*allowLoweredTypes=*/false);
}

ProtocolConformanceRef remapConformance(Type ty,
Expand Down

0 comments on commit ce5bef8

Please sign in to comment.