mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Sema] Non-requirement protocol members should inherit @usableFromInline
Previously, members of protocols that were not protocol requirements, like accessors and typealiases, did not inherit @usableFromInline from the parent protocol. Change this so they do.
This commit is contained in:
@@ -2439,8 +2439,7 @@ bool ValueDecl::isUsableFromInline() const {
|
||||
return true;
|
||||
|
||||
if (auto *containingProto = dyn_cast<ProtocolDecl>(getDeclContext())) {
|
||||
if (isProtocolRequirement() &&
|
||||
containingProto->getAttrs().hasAttribute<UsableFromInlineAttr>())
|
||||
if (containingProto->getAttrs().hasAttribute<UsableFromInlineAttr>())
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user