File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2697,7 +2697,11 @@ class ValueDecl : public Decl {
2697
2697
// / True if this is a C function that was imported as a member of a type in
2698
2698
// / Swift.
2699
2699
bool isImportAsMember () const ;
2700
-
2700
+
2701
+ // / Returns true if the declaration's interface type is a function type with a
2702
+ // / curried self parameter.
2703
+ bool hasCurriedSelf () const ;
2704
+
2701
2705
// / Get the decl for this value's opaque result type, if it has one.
2702
2706
OpaqueTypeDecl *getOpaqueResultTypeDecl () const ;
2703
2707
@@ -7168,6 +7172,14 @@ inline bool ValueDecl::isImportAsMember() const {
7168
7172
return false ;
7169
7173
}
7170
7174
7175
+ inline bool ValueDecl::hasCurriedSelf () const {
7176
+ if (auto *afd = dyn_cast<AbstractFunctionDecl>(this ))
7177
+ return afd->hasImplicitSelfDecl ();
7178
+ if (isa<EnumElementDecl>(this ))
7179
+ return true ;
7180
+ return false ;
7181
+ }
7182
+
7171
7183
inline bool Decl::isPotentiallyOverridable () const {
7172
7184
if (isa<VarDecl>(this ) ||
7173
7185
isa<SubscriptDecl>(this ) ||
You can’t perform that action at this time.
0 commit comments