@@ -767,8 +767,8 @@ void GenericArgumentsMismatchFailure::emitNoteForMismatch(int position) {
767
767
// to parameter conversions, let's use parameter type as a source of
768
768
// generic parameter information.
769
769
auto paramSourceTy =
770
- locator->isLastElement (ConstraintLocator ::ApplyArgToParam) ? getRequired ()
771
- : getActual ();
770
+ locator->isLastElement <LocatorPathElt ::ApplyArgToParam>( ) ? getRequired ()
771
+ : getActual ();
772
772
773
773
auto genericTypeDecl = paramSourceTy->getAnyGeneric ();
774
774
auto param = genericTypeDecl->getGenericParams ()->getParams ()[position];
@@ -1246,7 +1246,7 @@ bool MissingOptionalUnwrapFailure::diagnoseAsError() {
1246
1246
// r-value adjustment because base could be an l-value type.
1247
1247
// We want to fix both cases by only diagnose one of them,
1248
1248
// otherwise this is just going to result in a duplcate diagnostic.
1249
- if (getLocator ()->isLastElement (ConstraintLocator ::UnresolvedMember))
1249
+ if (getLocator ()->isLastElement <LocatorPathElt ::UnresolvedMember>( ))
1250
1250
return false ;
1251
1251
1252
1252
if (auto assignExpr = dyn_cast<AssignExpr>(anchor))
@@ -2035,7 +2035,7 @@ bool ContextualFailure::diagnoseConversionToNil() const {
2035
2035
2036
2036
Optional<ContextualTypePurpose> CTP;
2037
2037
// Easy case were failure has been identified as contextual already.
2038
- if (locator->isLastElement (ConstraintLocator ::ContextualType)) {
2038
+ if (locator->isLastElement <LocatorPathElt ::ContextualType>( )) {
2039
2039
CTP = getContextualTypePurpose ();
2040
2040
} else {
2041
2041
// Here we need to figure out where where `nil` is located.
@@ -3596,7 +3596,7 @@ bool MissingArgumentsFailure::diagnoseAsError() {
3596
3596
//
3597
3597
// foo(bar) // `() -> Void` vs. `(Int) -> Void`
3598
3598
// ```
3599
- if (locator->isLastElement (ConstraintLocator ::ApplyArgToParam)) {
3599
+ if (locator->isLastElement <LocatorPathElt ::ApplyArgToParam>( )) {
3600
3600
auto info = *getFunctionArgApplyInfo (locator);
3601
3601
3602
3602
auto *argExpr = info.getArgExpr ();
@@ -3612,7 +3612,7 @@ bool MissingArgumentsFailure::diagnoseAsError() {
3612
3612
// func foo() {}
3613
3613
// let _: (Int) -> Void = foo
3614
3614
// ```
3615
- if (locator->isLastElement (ConstraintLocator ::ContextualType)) {
3615
+ if (locator->isLastElement <LocatorPathElt ::ContextualType>( )) {
3616
3616
auto &cs = getConstraintSystem ();
3617
3617
emitDiagnostic (anchor->getLoc (), diag::cannot_convert_initializer_value,
3618
3618
getType (anchor), resolveType (cs.getContextualType ()));
@@ -3885,7 +3885,7 @@ bool MissingArgumentsFailure::diagnoseClosure(ClosureExpr *closure) {
3885
3885
3886
3886
bool MissingArgumentsFailure::diagnoseInvalidTupleDestructuring () const {
3887
3887
auto *locator = getLocator ();
3888
- if (!locator->isLastElement (ConstraintLocator ::ApplyArgument))
3888
+ if (!locator->isLastElement <LocatorPathElt ::ApplyArgument>( ))
3889
3889
return false ;
3890
3890
3891
3891
if (SynthesizedArgs.size () < 2 )
0 commit comments