Skip to content

Commit

Permalink
Merge pull request swiftlang#59672 from beccadax/what-is-the-protocol…
Browse files Browse the repository at this point in the history
…-for-generating-sendable

Ignore Sendable conformances in PrintAsClang
  • Loading branch information
beccadax authored Jun 24, 2022
2 parents 158953c + 8a8e71e commit dfb8d74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/PrintAsClang/ModuleContentsWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,10 @@ class ModuleWriter {
bool allRequirementsSatisfied = true;

for (auto proto : PD->getInheritedProtocols()) {
assert(proto->isObjC());
allRequirementsSatisfied &= require(proto);
if (printer.shouldInclude(proto)) {
assert(proto->isObjC());
allRequirementsSatisfied &= require(proto);
}
}

if (!allRequirementsSatisfied)
Expand Down
2 changes: 1 addition & 1 deletion test/PrintAsObjC/protocols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import objc_generics

// CHECK-LABEL: @protocol B <A>
// CHECK-NEXT: @end
@objc protocol B : A {}
@objc protocol B : A, Sendable {}

// CHECK-LABEL: @protocol CompletionAndAsync
// CHECK-NEXT: - (void)helloWithCompletion:(void (^ _Nonnull)(BOOL))completion;
Expand Down

0 comments on commit dfb8d74

Please sign in to comment.