File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -766,14 +766,17 @@ void EmitPolymorphicParameters::injectAdHocDistributedRequirements() {
766
766
if (!genericParam)
767
767
return ;
768
768
769
- auto requirements = sig->getLocalRequirements (genericParam);
770
- if (requirements. protos .empty ())
769
+ auto protocols = sig->getRequiredProtocols (genericParam);
770
+ if (protocols .empty ())
771
771
return ;
772
772
773
773
auto archetypeTy = getTypeInContext (genericParam->getCanonicalType ());
774
774
llvm::Value *metadata = IGF.emitTypeMetadataRef (archetypeTy);
775
775
776
- for (auto *proto : requirements.protos ) {
776
+ for (auto *proto : protocols) {
777
+ if (!Lowering::TypeConverter::protocolRequiresWitnessTable (proto))
778
+ continue ;
779
+
777
780
// Lookup the witness table for this protocol dynamically via
778
781
// swift_conformsToProtocol(<<archetype>>, <<protocol>>)
779
782
auto *witnessTable = IGF.Builder .CreateCall (
You can’t perform that action at this time.
0 commit comments