[Sema] Switch typeCheckExpression to use ContextualTypeInfo

This commit is contained in:
Pavel Yaskevich
2020-10-06 12:21:07 -07:00
parent 588d42c564
commit 05b223aa0b
11 changed files with 49 additions and 41 deletions

View File

@@ -29,6 +29,7 @@
#include "swift/Subsystems.h"
#include "TypeChecker.h"
#include "ConstraintSystem.h"
using namespace swift;
@@ -244,7 +245,8 @@ private:
// TODO: typeCheckExpression() seems to assign types to everything here,
// but may not be sufficient in some cases.
Expr *FinalExpr = ClosureCall;
if (!TypeChecker::typeCheckExpression(FinalExpr, getCurrentDeclContext()))
if (!TypeChecker::typeCheckExpression(FinalExpr, getCurrentDeclContext(),
/*contextualInfo=*/{}))
llvm::report_fatal_error("Could not type-check instrumentation");
// Captures have to be computed after the closure is type-checked. This