File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -6363,6 +6363,9 @@ ConstructorDecl *NominalTypeDecl::getDefaultInitializer() const {
63636363}
63646364
63656365void NominalTypeDecl::synthesizeSemanticMembersIfNeeded (DeclName member) {
6366+ if (isa<ProtocolDecl>(this ))
6367+ return ;
6368+
63666369 // Silently break cycles here because we can't be sure when and where a
63676370 // request to synthesize will come from yet.
63686371 // FIXME: rdar://56844567
Original file line number Diff line number Diff line change @@ -1364,6 +1364,8 @@ evaluator::SideEffect
13641364ResolveImplicitMemberRequest::evaluate (Evaluator &evaluator,
13651365 NominalTypeDecl *target,
13661366 ImplicitMemberAction action) const {
1367+ ASSERT (!isa<ProtocolDecl>(target));
1368+
13671369 // FIXME: This entire request is a layering violation made of smaller,
13681370 // finickier layering violations. See rdar://56844567
13691371
Original file line number Diff line number Diff line change @@ -2941,7 +2941,7 @@ static ArrayRef<Decl *> evaluateMembersRequest(
29412941 }
29422942 }
29432943
2944- if (nominal) {
2944+ if (nominal && !isa<ProtocolDecl>(nominal) ) {
29452945 // If the type conforms to Encodable or Decodable, even via an extension,
29462946 // the CodingKeys enum is synthesized as a member of the type itself.
29472947 // Force it into existence.
You can’t perform that action at this time.
0 commit comments