mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user