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.
2 parents 05d77fa + d6853c2 commit 594469aCopy full SHA for 594469a
include/swift/Sema/ConstraintLocator.h
@@ -1264,11 +1264,11 @@ class ConstraintLocatorBuilder {
1264
template <typename E>
1265
bool directlyAt() const {
1266
if (auto *expr = getAnchor().dyn_cast<Expr *>())
1267
- return isa<E>(expr) && hasEmptyPath();
+ return isa<E>(expr) && !last();
1268
return false;
1269
}
1270
1271
- /// Determine whether this builder has an empty path.
+ /// Determine whether this builder has an empty path (no new elements).
1272
bool hasEmptyPath() const {
1273
return !element;
1274
0 commit comments