Skip to content

Commit 3de701f

Browse files
authored
Merge pull request #40681 from DougGregor/unowned-executor-anywhere
2 parents a0693c4 + a11e3fd commit 3de701f

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4439,9 +4439,6 @@ ERROR(distributed_actor_protocol_illegal_inheritance,none,
44394439
ERROR(broken_distributed_actor_requirement,none,
44404440
"DistributedActor protocol is broken: unexpected requirement", ())
44414441

4442-
ERROR(unowned_executor_outside_actor,none,
4443-
"'unownedExecutor' can only be implemented within the main "
4444-
"definition of an actor", ())
44454442
ERROR(override_implicit_unowned_executor,none,
44464443
"cannot override an actor's 'unownedExecutor' property that wasn't "
44474444
"explicitly defined", ())

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4948,19 +4948,6 @@ void ConformanceChecker::resolveValueWitnesses() {
49484948
return;
49494949
}
49504950

4951-
// Ensure that Actor.unownedExecutor is implemented within the
4952-
// actor class itself. But if this somehow resolves to the
4953-
// requirement, ignore it.
4954-
if (requirement->getName().isSimpleName(C.Id_unownedExecutor) &&
4955-
Proto->isSpecificProtocol(KnownProtocolKind::Actor) &&
4956-
DC != witness->getDeclContext() &&
4957-
!isa<ProtocolDecl>(witness->getDeclContext()) &&
4958-
Adoptee->getClassOrBoundGenericClass() &&
4959-
Adoptee->getClassOrBoundGenericClass()->isActor()) {
4960-
witness->diagnose(diag::unowned_executor_outside_actor);
4961-
return;
4962-
}
4963-
49644951
// Objective-C checking for @objc requirements.
49654952
if (requirement->isObjC() &&
49664953
requirement->getName() == witness->getName() &&

0 commit comments

Comments
 (0)