Skip to content

Commit e8ef77d

Browse files
committed
[Sema] NFC: Elaborate on a comment
1 parent 1cc00e3 commit e8ef77d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/Sema/MiscDiagnostics.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2524,7 +2524,14 @@ static void diagnoseImplicitSelfUseInClosure(const Expr *E,
25242524
AbstractClosureExpr *ACE = nullptr;
25252525
if (DC->isLocalContext()) {
25262526
while (DC->getParent()->isLocalContext() && !ACE) {
2527-
// FIXME: This is happening too early, because closure->getType() isn't set.
2527+
// FIXME: The closure's type may not be set here yet since we have a
2528+
// couple of calls to typeCheckExpression remaining in CSApply that can
2529+
// result in running this logic before the solution has been applied to
2530+
// the parent expression. Additionally, lazy locals can have their
2531+
// initializers type-checked from CSGen due to the fact that that name
2532+
// lookup can kick LazyStoragePropertyRequest, which currently eagerly
2533+
// computes the interface type. The interface type computation there ought
2534+
// to be made lazy.
25282535
if (auto *closure = dyn_cast<AbstractClosureExpr>(DC))
25292536
if (closure->getType())
25302537
if (DiagnoseWalker::isClosureRequiringSelfQualification(closure))

0 commit comments

Comments
 (0)