Skip to content

Commit 78b7d5c

Browse files
author
Adam Cmiel
committed
[Sema] clarify inline docs
1 parent 51941e9 commit 78b7d5c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3280,14 +3280,15 @@ namespace {
32803280
}
32813281
}
32823282

3283-
// Check for an 'async let' autoclosure.
32843283
if (auto autoclosure = dyn_cast<AutoClosureExpr>(dc)) {
32853284
switch (autoclosure->getThunkKind()) {
32863285
case AutoClosureExpr::Kind::AsyncLet:
3286+
// Check for an 'async let' autoclosure.
32873287
return ReferencedActor(var, isPotentiallyIsolated, ReferencedActor::AsyncLet);
3288-
32893288
case AutoClosureExpr::Kind::DoubleCurryThunk:
32903289
case AutoClosureExpr::Kind::SingleCurryThunk:
3290+
// Curried thunks inherit actor isolation but referencing the thunked
3291+
// fn shouldn't cause a data race until the fn is actually applied
32913292
return ReferencedActor(var, isPotentiallyIsolated, specificNonIsoClosureKind(dc));
32923293
case AutoClosureExpr::Kind::None:
32933294
break;

0 commit comments

Comments
 (0)