Skip to content

Commit e5599ef

Browse files
committed
Make coerceParameterListToType a utility
1 parent 8fc054a commit e5599ef

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/Sema/CSApply.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7211,7 +7211,7 @@ namespace {
72117211
// Coerce the pattern, in case we resolved something.
72127212
auto fnType = cs.getType(closure)->castTo<FunctionType>();
72137213
auto *params = closure->getParameters();
7214-
cs.getTypeChecker().coerceParameterListToType(params, closure, fnType);
7214+
TypeChecker::coerceParameterListToType(params, closure, fnType);
72157215

72167216
// If this closure had a function builder applied, rewrite it to a
72177217
// closure with a single expression body containing the builder

lib/Sema/TypeChecker.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,8 @@ class TypeChecker final {
13341334

13351335
/// Coerce the specified parameter list of a ClosureExpr to the specified
13361336
/// contextual type.
1337-
void coerceParameterListToType(ParameterList *P, ClosureExpr *CE, AnyFunctionType *FN);
1337+
static void coerceParameterListToType(ParameterList *P, ClosureExpr *CE,
1338+
AnyFunctionType *FN);
13381339

13391340
/// Type-check an initialized variable pattern declaration.
13401341
bool typeCheckBinding(Pattern *&P, Expr *&Init, DeclContext *DC);

0 commit comments

Comments
 (0)