mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
ModuleInterface: Handle custom availability domains for synthesized conformances.
When gathering availability attributes to print in a .swiftinterface for synthesized conformances to inherited protocols, don't assume availabilty attributes always have a platform kind. Resolves rdar://170361240.
This commit is contained in:
@@ -456,10 +456,9 @@ class InheritedProtocolCollector {
|
||||
for (auto nextAttr : D->getSemanticAvailableAttrs()) {
|
||||
// FIXME: This is just approximating the effects of nested availability
|
||||
// attributes for the same platform; formally they'd need to be merged.
|
||||
// FIXME: [availability] This should compare availability domains.
|
||||
bool alreadyHasMoreSpecificAttrForThisPlatform = llvm::any_of(
|
||||
*cache, [nextAttr](SemanticAvailableAttr existingAttr) {
|
||||
return existingAttr.getPlatform() == nextAttr.getPlatform();
|
||||
return existingAttr.getDomain() == nextAttr.getDomain();
|
||||
});
|
||||
if (alreadyHasMoreSpecificAttrForThisPlatform)
|
||||
continue;
|
||||
@@ -695,7 +694,7 @@ public:
|
||||
if (!printOptions.shouldPrint(nominal))
|
||||
return;
|
||||
|
||||
/// is this nominal specifically an 'actor' or 'distributed actor'?
|
||||
// Is this nominal specifically an 'actor' or 'distributed actor'?
|
||||
bool anyActorClass = false;
|
||||
if (auto klass = dyn_cast<ClassDecl>(nominal)) {
|
||||
anyActorClass = klass->isAnyActor();
|
||||
|
||||
Reference in New Issue
Block a user