mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Module interfaces] More aggressively #if-out declarations.
Extend the checks for marker protocols and rethrows protocols to ensure that we #if out more code that relies on them in module interface generation. This makes the _Concurrency module parseable by much older compilers. Fixes rdar://75291705.
This commit is contained in:
@@ -550,11 +550,11 @@ public:
|
||||
if (!handledProtocols.insert(inherited).second)
|
||||
return TypeWalker::Action::SkipChildren;
|
||||
|
||||
// If 'nominal' is an 'actor class', we do not synthesize its
|
||||
// conformance to the Actor protocol through a dummy extension.
|
||||
// If 'nominal' is an actor, we do not synthesize its conformance
|
||||
// to the Actor protocol through a dummy extension.
|
||||
// There is a special restriction on the Actor protocol in that
|
||||
// it is only valid to conform to Actor on an 'actor class' decl,
|
||||
// not extensions of that 'actor class'.
|
||||
// it is only valid to conform to Actor on an 'actor' decl,
|
||||
// not extensions of that 'actor'.
|
||||
if (actorClass &&
|
||||
inherited->isSpecificProtocol(KnownProtocolKind::Actor))
|
||||
return TypeWalker::Action::SkipChildren;
|
||||
|
||||
Reference in New Issue
Block a user