mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[IDE] Annotate the explicit result type of a closure.
Swift SVN r21808
This commit is contained in:
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user