Skip to content

Commit a71e3d9

Browse files
committed
[embedded] Use the type witness from the specialized conformance
rather then the specialized conformance's root conformance (which is the variable's value)
1 parent b9f6454 commit a71e3d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/IRGen/GenProto.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,11 +1750,11 @@ class AccessorConformanceInfo : public ConformanceInfo {
17501750
(void)entry;
17511751
#endif
17521752

1753-
auto typeWitness = Conformance.getTypeWitness(assocType);
1754-
if (langOpts.hasFeature(Feature::EmbeddedExistentials) &&
1755-
SILWT->isSpecialized()) {
1753+
Type typeWitness;
1754+
if (SILWT->isSpecialized())
17561755
typeWitness = entry.getAssociatedTypeWitness().Witness;
1757-
}
1756+
else
1757+
typeWitness = Conformance.getTypeWitness(assocType);
17581758

17591759
if (IGM.Context.LangOpts.hasFeature(Feature::EmbeddedExistentials)) {
17601760
// In Embedded Swift associated type witness point to the metadata.

0 commit comments

Comments
 (0)