@@ -167,7 +167,7 @@ class FailureDiagnosis :public ASTVisitor<FailureDiagnosis, /*exprresult*/bool>{
167
167
FreeTypeVariableBinding allowFreeTypeVariables =
168
168
FreeTypeVariableBinding::Disallow,
169
169
ExprTypeCheckListener *listener = nullptr ) {
170
- CS. TC . getPossibleTypesOfExpressionWithoutApplying (
170
+ TypeChecker:: getPossibleTypesOfExpressionWithoutApplying (
171
171
expr, dc, types, allowFreeTypeVariables, listener);
172
172
CS.cacheExprTypes (expr);
173
173
}
@@ -177,8 +177,11 @@ class FailureDiagnosis :public ASTVisitor<FailureDiagnosis, /*exprresult*/bool>{
177
177
FreeTypeVariableBinding allowFreeTypeVariables =
178
178
FreeTypeVariableBinding::Disallow,
179
179
ExprTypeCheckListener *listener = nullptr ) {
180
- auto type = CS.TC .getTypeOfExpressionWithoutApplying (expr, dc, referencedDecl,
181
- allowFreeTypeVariables, listener);
180
+ auto type =
181
+ TypeChecker::getTypeOfExpressionWithoutApplying (expr, dc,
182
+ referencedDecl,
183
+ allowFreeTypeVariables,
184
+ listener);
182
185
CS.cacheExprTypes (expr);
183
186
return type;
184
187
}
@@ -1757,7 +1760,8 @@ bool FailureDiagnosis::diagnoseImplicitSelfErrors(
1757
1760
for (unsigned i = 0 , e = argTuple->getNumElements (); i < e; ++i) {
1758
1761
ConcreteDeclRef ref = nullptr ;
1759
1762
auto *el = argTuple->getElement (i);
1760
- auto typeResult = getTypeOfExpressionWithoutApplying (el, CS.DC , ref);
1763
+ auto typeResult =
1764
+ TypeChecker::getTypeOfExpressionWithoutApplying (el, CS.DC , ref);
1761
1765
if (!typeResult)
1762
1766
return false ;
1763
1767
auto flags = ParameterTypeFlags ().withInOut (typeResult->is <InOutType>());
@@ -2097,7 +2101,7 @@ bool FailureDiagnosis::diagnoseSubscriptErrors(SubscriptExpr *SE,
2097
2101
ConcreteDeclRef decl = nullptr ;
2098
2102
message = diag::cannot_subscript_with_index;
2099
2103
2100
- if (getTypeOfExpressionWithoutApplying (expr, CS.DC , decl))
2104
+ if (TypeChecker:: getTypeOfExpressionWithoutApplying (expr, CS.DC , decl))
2101
2105
return false ;
2102
2106
2103
2107
// If we are down to a single candidate but with an unresolved
@@ -2587,7 +2591,7 @@ bool FailureDiagnosis::visitApplyExpr(ApplyExpr *callExpr) {
2587
2591
" unexpected declaration reference" );
2588
2592
2589
2593
ConcreteDeclRef decl = nullptr ;
2590
- Type type = getTypeOfExpressionWithoutApplying (
2594
+ Type type = TypeChecker:: getTypeOfExpressionWithoutApplying (
2591
2595
fnExpr, CS.DC , decl, FreeTypeVariableBinding::UnresolvedType,
2592
2596
&listener);
2593
2597
@@ -3213,7 +3217,7 @@ bool FailureDiagnosis::diagnoseClosureExpr(
3213
3217
// diagnose situations where contextual type expected one result
3214
3218
// type but actual closure produces a different one without explicitly
3215
3219
// declaring it (e.g. by using anonymous parameters).
3216
- auto type = getTypeOfExpressionWithoutApplying (
3220
+ auto type = TypeChecker:: getTypeOfExpressionWithoutApplying (
3217
3221
closure, CS.DC , decl, FreeTypeVariableBinding::Disallow);
3218
3222
3219
3223
if (type && resultTypeProcessor (type, expectedResultType))
@@ -4072,7 +4076,7 @@ diagnoseAmbiguousMultiStatementClosure(ClosureExpr *closure) {
4072
4076
// successfully type-checked its type cleanup is going to be disabled
4073
4077
// (we are allowing unresolved types), and as a side-effect it might
4074
4078
// also be transformed e.g. OverloadedDeclRefExpr -> DeclRefExpr.
4075
- auto type = getTypeOfExpressionWithoutApplying (
4079
+ auto type = TypeChecker:: getTypeOfExpressionWithoutApplying (
4076
4080
resultExpr, CS.DC , decl, FreeTypeVariableBinding::UnresolvedType);
4077
4081
if (type)
4078
4082
resultType = type->getRValueType ();
0 commit comments