[embedded] Use the type witness from the specialized conformance

rather then the specialized conformance's root conformance (which is the  variable's value)
This commit is contained in:
Arnold Schwaighofer
2025-12-01 07:41:28 -08:00
parent b9f6454386
commit a71e3d92cd

View File

@@ -1750,11 +1750,11 @@ public:
(void)entry;
#endif
auto typeWitness = Conformance.getTypeWitness(assocType);
if (langOpts.hasFeature(Feature::EmbeddedExistentials) &&
SILWT->isSpecialized()) {
Type typeWitness;
if (SILWT->isSpecialized())
typeWitness = entry.getAssociatedTypeWitness().Witness;
}
else
typeWitness = Conformance.getTypeWitness(assocType);
if (IGM.Context.LangOpts.hasFeature(Feature::EmbeddedExistentials)) {
// In Embedded Swift associated type witness point to the metadata.