Skip to content

Commit 1c08aec

Browse files
committed
[Concurrency] allow isolated on dynamic self types
1 parent 6028bfb commit 1c08aec

File tree

2 files changed

+8
-389
lines changed

2 files changed

+8
-389
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4483,6 +4483,10 @@ TypeResolver::resolveIsolatedTypeRepr(IsolatedTypeRepr *repr,
44834483

44844484
Type type = resolveType(repr->getBase(), options);
44854485

4486+
if (auto ty = dyn_cast<DynamicSelfType>(type)) {
4487+
type = ty->getSelfType();
4488+
}
4489+
44864490
// isolated parameters must be of actor type
44874491
if (!type->hasTypeParameter() && !type->isAnyActorType() && !type->hasError()) {
44884492
// Optional actor types are fine - `nil` represents `nonisolated`.

0 commit comments

Comments
 (0)