Skip to content

Commit 5e892b3

Browse files
committed
Sema: Eagerly expand scopes in TypeCheckASTNodeAtLocRequest
1 parent 7df8b70 commit 5e892b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/TypeCheckStmt.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "MiscDiagnostics.h"
2121
#include "swift/Subsystems.h"
2222
#include "swift/AST/ASTPrinter.h"
23+
#include "swift/AST/ASTScope.h"
2324
#include "swift/AST/ASTWalker.h"
2425
#include "swift/AST/ASTVisitor.h"
2526
#include "swift/AST/DiagnosticsSema.h"
@@ -1892,6 +1893,8 @@ bool TypeCheckASTNodeAtLocRequest::evaluate(Evaluator &evaluator,
18921893
if (auto *AFD = dyn_cast<AbstractFunctionDecl>(DC)) {
18931894
if (AFD->isBodyTypeChecked())
18941895
return false;
1896+
1897+
ASTScope::expandFunctionBody(AFD);
18951898
}
18961899

18971900
// Function builder function doesn't support partial type checking.

0 commit comments

Comments
 (0)