File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,10 @@ class TypeVariableType::Implementation {
301
301
// / Determine whether this type variable represents a closure type.
302
302
bool isClosureType () const ;
303
303
304
+ // / Determine whether this type variable represents one of the
305
+ // / parameter types associated with a closure.
306
+ bool isClosureParameterType () const ;
307
+
304
308
// / Determine whether this type variable represents a closure result type.
305
309
bool isClosureResultType () const ;
306
310
Original file line number Diff line number Diff line change @@ -90,6 +90,14 @@ bool TypeVariableType::Implementation::isClosureType() const {
90
90
return isExpr<ClosureExpr>(locator->getAnchor ()) && locator->getPath ().empty ();
91
91
}
92
92
93
+ bool TypeVariableType::Implementation::isClosureParameterType () const {
94
+ if (!(locator && locator->getAnchor ()))
95
+ return false ;
96
+
97
+ return isExpr<ClosureExpr>(locator->getAnchor ()) &&
98
+ locator->isLastElement <LocatorPathElt::TupleElement>();
99
+ }
100
+
93
101
bool TypeVariableType::Implementation::isClosureResultType () const {
94
102
if (!(locator && locator->getAnchor ()))
95
103
return false ;
You can’t perform that action at this time.
0 commit comments