Skip to content

Commit

Permalink
improve typing, NFC.
Browse files Browse the repository at this point in the history
Swift SVN r28800
  • Loading branch information
lattner committed May 19, 2015
1 parent 10a8416 commit 52bf662
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Sema/CSApply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ namespace {
///
/// \returns The coerced closure expression.
///
ClosureExpr *coerceClosureExprToVoid(Expr *expr);
ClosureExpr *coerceClosureExprToVoid(ClosureExpr *expr);

/// \brief Coerce the given expression to the given type.
///
Expand Down Expand Up @@ -4461,11 +4461,10 @@ static bool applyTypeToClosureExpr(Expr *expr, Type toType) {
return false;
}

ClosureExpr *ExprRewriter::coerceClosureExprToVoid(Expr *expr) {
ClosureExpr *ExprRewriter::coerceClosureExprToVoid(ClosureExpr *closureExpr) {

auto &tc = cs.getTypeChecker();
// Re-write the single-expression closure to return '()'
auto closureExpr = cast<ClosureExpr>(expr);
assert(closureExpr->hasSingleExpressionBody());

auto member = closureExpr->getBody()->getElement(0);
Expand Down

0 comments on commit 52bf662

Please sign in to comment.