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 @@ -5937,17 +5937,33 @@ llvm::TinyPtrVector<CustomAttr *> VarDecl::getAttachedPropertyWrappers() const {
5937
5937
5938
5938
// / Whether this property has any attached property wrappers.
5939
5939
bool VarDecl::hasAttachedPropertyWrapper () const {
5940
- return !getAttachedPropertyWrappers ().empty () || hasImplicitPropertyWrapper ();
5940
+ if (getAttrs ().hasAttribute <CustomAttr>()) {
5941
+ if (!getAttachedPropertyWrappers ().empty ())
5942
+ return true ;
5943
+ }
5944
+
5945
+ if (hasImplicitPropertyWrapper ())
5946
+ return true ;
5947
+
5948
+ return false ;
5941
5949
}
5942
5950
5943
5951
bool VarDecl::hasImplicitPropertyWrapper () const {
5944
- if (!getAttachedPropertyWrappers ().empty ())
5952
+ if (getAttrs ().hasAttribute <CustomAttr>()) {
5953
+ if (!getAttachedPropertyWrappers ().empty ())
5954
+ return false ;
5955
+ }
5956
+
5957
+ if (isImplicit ())
5945
5958
return false ;
5946
5959
5947
- auto *dc = getDeclContext ();
5948
- bool isClosureParam = isa<ParamDecl>(this ) &&
5949
- dc->getContextKind () == DeclContextKind::AbstractClosureExpr;
5950
- return !isImplicit () && getName ().hasDollarPrefix () && isClosureParam;
5960
+ if (!isa<ParamDecl>(this ))
5961
+ return false ;
5962
+
5963
+ if (!isa<AbstractClosureExpr>(getDeclContext ()))
5964
+ return false ;
5965
+
5966
+ return getName ().hasDollarPrefix ();
5951
5967
}
5952
5968
5953
5969
bool VarDecl::hasExternalPropertyWrapper () const {
You can’t perform that action at this time.
0 commit comments