File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -5936,17 +5936,33 @@ llvm::TinyPtrVector<CustomAttr *> VarDecl::getAttachedPropertyWrappers() const {
59365936
59375937// / Whether this property has any attached property wrappers.
59385938bool VarDecl::hasAttachedPropertyWrapper () const {
5939- return !getAttachedPropertyWrappers ().empty () || hasImplicitPropertyWrapper ();
5939+ if (getAttrs ().hasAttribute <CustomAttr>()) {
5940+ if (!getAttachedPropertyWrappers ().empty ())
5941+ return true ;
5942+ }
5943+
5944+ if (hasImplicitPropertyWrapper ())
5945+ return true ;
5946+
5947+ return false ;
59405948}
59415949
59425950bool VarDecl::hasImplicitPropertyWrapper () const {
5943- if (!getAttachedPropertyWrappers ().empty ())
5951+ if (getAttrs ().hasAttribute <CustomAttr>()) {
5952+ if (!getAttachedPropertyWrappers ().empty ())
5953+ return false ;
5954+ }
5955+
5956+ if (isImplicit ())
59445957 return false ;
59455958
5946- auto *dc = getDeclContext ();
5947- bool isClosureParam = isa<ParamDecl>(this ) &&
5948- dc->getContextKind () == DeclContextKind::AbstractClosureExpr;
5949- return !isImplicit () && getName ().hasDollarPrefix () && isClosureParam;
5959+ if (!isa<ParamDecl>(this ))
5960+ return false ;
5961+
5962+ if (!isa<AbstractClosureExpr>(getDeclContext ()))
5963+ return false ;
5964+
5965+ return getName ().hasDollarPrefix ();
59505966}
59515967
59525968bool VarDecl::hasExternalPropertyWrapper () const {
You can’t perform that action at this time.
0 commit comments