@@ -341,12 +341,11 @@ swift::getDistributedSerializationRequirements(
341
341
return true ; // we're done here, any means there are no requirements
342
342
343
343
auto *serialReqType = existentialRequirementTy->getAs <ExistentialType>();
344
- ->getAs <ExistentialType>();
345
344
if (!serialReqType || serialReqType->hasError ()) {
346
345
return false ;
347
346
}
348
347
349
- auto desugaredTy = serialReqType->getConstraintType ();
348
+ auto layout = serialReqType->getExistentialLayout ();
350
349
for (auto p : layout.getProtocols ()) {
351
350
requirementProtos.insert (p);
352
351
}
@@ -1234,16 +1233,20 @@ swift::extractDistributedSerializationRequirements(
1234
1233
if (auto dependentMemberType =
1235
1234
req.getFirstType ()->castTo <DependentMemberType>()) {
1236
1235
if (dependentMemberType->getAssocType () == daSerializationReqAssocType) {
1237
- auto requirementProto = req.getSecondType ();
1238
- if (auto proto = dyn_cast_or_null<ProtocolDecl>(
1239
- requirementProto->getAnyNominal ())) {
1240
- into.insert (proto);
1241
- } else {
1242
- auto serialReqType = requirementProto->castTo <ExistentialType>()
1243
- ->getConstraintType ();
1244
- auto flattenedRequirements =
1245
- flattenDistributedSerializationTypeToRequiredProtocols (
1246
- serialReqType.getPointer ());
1236
+ // auto requirementProto = req.getSecondType();
1237
+ // if (auto proto = dyn_cast_or_null<ProtocolDecl>(
1238
+ // requirementProto->getAnyNominal())) {
1239
+ // into.insert(proto);
1240
+ // } else {
1241
+ // auto serialReqType = requirementProto->castTo<ExistentialType>()
1242
+ // ->getConstraintType();
1243
+ // auto flattenedRequirements =
1244
+ // flattenDistributedSerializationTypeToRequiredProtocols(
1245
+ // serialReqType.getPointer());
1246
+ // for (auto p : flattenedRequirements) {
1247
+ // into.insert(p);
1248
+ // }
1249
+ auto layout = req.getSecondType ()->getExistentialLayout ();
1247
1250
for (auto p : layout.getProtocols ()) {
1248
1251
serializationReqs.insert (p);
1249
1252
}
0 commit comments