Skip to content

Commit 2668b52

Browse files
committed
[Runtime] Unique foreign witness tables based on the conformance type descriptor.
1 parent 933dece commit 2668b52

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

stdlib/public/runtime/Metadata.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3967,13 +3967,12 @@ swift::swift_getWitnessTable(const ProtocolConformanceDescriptor *conformance,
39673967
const void * const *instantiationArgs) {
39683968
/// Local function to unique a foreign witness table, if needed.
39693969
auto uniqueForeignWitnessTableRef =
3970-
[conformance, type](const WitnessTable *candidate)
3971-
-> const WitnessTable * {
3970+
[conformance](const WitnessTable *candidate) {
39723971
if (!candidate || !conformance->isSynthesizedNonUnique())
39733972
return candidate;
39743973

39753974
return _getForeignWitnessTable(candidate,
3976-
type->getTypeContextDescriptor(),
3975+
conformance->getTypeContextDescriptor(),
39773976
conformance->getProtocol());
39783977
};
39793978

0 commit comments

Comments
 (0)