[IDE] Annotate the explicit result type of a closure.

Swift SVN r21808
This commit is contained in:
Argyrios Kyrtzidis
2014-09-09 16:53:33 +00:00
parent 085a5d33e5
commit 7049168e4b
3 changed files with 10 additions and 0 deletions

View File

@@ -319,6 +319,10 @@ class Traversal : public ASTVisitor<Traversal, Expr*, Stmt*,
else
return nullptr;
if (expr->hasExplicitResultType())
if (doIt(expr->getExplicitResultTypeLoc().getTypeRepr()))
return nullptr;
// Handle single-expression closures.
if (expr->hasSingleExpressionBody()) {
if (Expr *body = doIt(expr->getSingleExpressionBody())) {