We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
endsWith
1 parent 30d09de commit af7b722Copy full SHA for af7b722
include/swift/Sema/ConstraintLocator.h
@@ -1295,6 +1295,16 @@ class ConstraintLocatorBuilder {
1295
return None;
1296
}
1297
1298
+ /// Check whether this locator has the given locator path element
1299
+ /// at the end of its path.
1300
+ template <class Kind>
1301
+ bool endsWith() const {
1302
+ if (auto lastElt = last()) {
1303
+ return lastElt->is<Kind>();
1304
+ }
1305
+ return false;
1306
1307
+
1308
/// Produce a debugging dump of this locator.
1309
SWIFT_DEBUG_DUMPER(dump(SourceManager *SM));
1310
SWIFT_DEBUG_DUMPER(dump(ConstraintSystem *CS));
0 commit comments