Move checking of non-failable-to-failable initializer calls into constraint application.

This makes sure we get the same checking for initializer delegation in
structs/enums as we do for classes, fixing rdar://problem/18458622.

Swift SVN r23128
This commit is contained in:
Doug Gregor
2014-11-06 06:29:35 +00:00
parent 5e682924f6
commit c1c51b4e8b
5 changed files with 74 additions and 75 deletions

View File

@@ -2159,11 +2159,13 @@ public:
/// \brief Apply a given solution to the expression, producing a fully
/// type-checked expression.
Expr *applySolution(Solution &solution, Expr *expr);
Expr *applySolution(Solution &solution, Expr *expr,
bool suppressDiagnostics);
/// \brief Apply a given solution to the expression to the top-level
/// expression, producing a fully type-checked expression.
Expr *applySolutionShallow(const Solution &solution, Expr *expr);
Expr *applySolutionShallow(const Solution &solution, Expr *expr,
bool suppressDiagnostics);
/// \brief Obtain the specializations computed for a type variable. This is
/// useful when emitting diagnostics for computed type variables.