From 6b076945c777afd66aa9b11bbfac6b96ffc7a1bc Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Thu, 1 Jul 2021 16:20:20 -0700 Subject: [PATCH] [Sema] Revert temporary downgrade of misplaced unownedExecutor diagnostic rdar://78932296 --- include/swift/AST/DiagnosticsSema.def | 5 +---- lib/Sema/TypeCheckProtocol.cpp | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/swift/AST/DiagnosticsSema.def b/include/swift/AST/DiagnosticsSema.def index 6cc439e9113ea..3802be1c9e143 100644 --- a/include/swift/AST/DiagnosticsSema.def +++ b/include/swift/AST/DiagnosticsSema.def @@ -4365,10 +4365,7 @@ ERROR(distributed_actor_protocol_illegal_inheritance,none, "non-distributed actor type %0 cannot conform to the 'DistributedActor' protocol", (DeclName)) -// FIXME: This diagnostic was temporarily downgraded from an error because -// it spuriously triggers when building the Foundation module from its textual -// swiftinterface. (rdar://78932296) -WARNING(unowned_executor_outside_actor,none, +ERROR(unowned_executor_outside_actor,none, "'unownedExecutor' can only be implemented within the main " "definition of an actor", ()) ERROR(override_implicit_unowned_executor,none, diff --git a/lib/Sema/TypeCheckProtocol.cpp b/lib/Sema/TypeCheckProtocol.cpp index 3475ed6710089..7270985fe8d25 100644 --- a/lib/Sema/TypeCheckProtocol.cpp +++ b/lib/Sema/TypeCheckProtocol.cpp @@ -4657,10 +4657,7 @@ void ConformanceChecker::resolveValueWitnesses() { Adoptee->getClassOrBoundGenericClass() && Adoptee->getClassOrBoundGenericClass()->isActor()) { witness->diagnose(diag::unowned_executor_outside_actor); - // FIXME: This diagnostic was temporarily downgraded from an error to a - // warning because it spuriously triggers when building the Foundation - // module from its textual swiftinterface. (rdar://78932296) - //return; + return; } // Objective-C checking for @objc requirements.