mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #23337 from aschwaighofer/support_dynamic_replacement_of_stored_with_observer
Add support for dynamic replacement of didSet/willSet
This commit is contained in:
@@ -4421,6 +4421,14 @@ bool AbstractStorageDecl::hasPrivateAccessor() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AbstractStorageDecl::hasDidSetOrWillSetDynamicReplacement() const {
|
||||
if (auto *func = getDidSetFunc())
|
||||
return func->getAttrs().hasAttribute<DynamicReplacementAttr>();
|
||||
if (auto *func = getWillSetFunc())
|
||||
return func->getAttrs().hasAttribute<DynamicReplacementAttr>();
|
||||
return false;
|
||||
}
|
||||
|
||||
void AbstractStorageDecl::setAccessors(StorageImplInfo implInfo,
|
||||
SourceLoc lbraceLoc,
|
||||
ArrayRef<AccessorDecl *> accessors,
|
||||
|
||||
Reference in New Issue
Block a user