File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -119,15 +119,8 @@ Type swift::getSerializationRequirementTypesForMember(
119
119
}
120
120
121
121
// Also store all `SerializationRequirement : SomeProtocol` requirements
122
- for (auto requirement: signature.getRequirements ()) {
123
- if (requirement.getFirstType ()->isEqual (SerReqAssocType) &&
124
- requirement.getKind () == RequirementKind::Conformance) {
125
- if (auto nominal = requirement.getSecondType ()->getAnyNominal ()) {
126
- if (auto protocol = dyn_cast<ProtocolDecl>(nominal)) {
127
- serializationRequirements.insert (protocol);
128
- }
129
- }
130
- }
122
+ for (auto proto: signature->getRequiredProtocols (SerReqAssocType)) {
123
+ serializationRequirements.insert (proto);
131
124
}
132
125
133
126
// Note that this may be null, e.g. if we're a distributed func inside
You can’t perform that action at this time.
0 commit comments