@@ -595,47 +595,6 @@ void swift::checkDistributedActorProperties(const NominalTypeDecl *decl) {
595595 }
596596}
597597
598- void swift::checkDistributedActorConstructor (const ClassDecl *decl, ConstructorDecl *ctor) {
599- // bail out unless distributed actor, only those have special rules to check here
600- if (!decl->isDistributedActor ())
601- return ;
602-
603- // Only designated initializers need extra checks
604- if (!ctor->isDesignatedInit ())
605- return ;
606-
607- // === Designated initializers must accept exactly one actor transport that
608- // matches the actor transport type of the actor.
609- SmallVector<ParamDecl*, 2 > transportParams;
610- int transportParamsCount = 0 ;
611- Type actorSystemTy = ctor->mapTypeIntoContext (
612- getDistributedActorSystemType (const_cast <ClassDecl *>(decl)));
613- for (auto param : *ctor->getParameters ()) {
614- auto paramTy = ctor->mapTypeIntoContext (param->getInterfaceType ());
615- if (paramTy->isEqual (actorSystemTy)) {
616- transportParamsCount += 1 ;
617- transportParams.push_back (param);
618- }
619- }
620-
621- // missing transport parameter
622- if (transportParamsCount == 0 ) {
623- ctor->diagnose (diag::distributed_actor_designated_ctor_missing_transport_param,
624- ctor->getName ());
625- // TODO(distributed): offer fixit to insert 'system: DistributedActorSystem'
626- return ;
627- }
628-
629- // ok! We found exactly one transport parameter
630- if (transportParamsCount == 1 )
631- return ;
632-
633- // TODO(distributed): rdar://81824959 report the error on the offending (2nd) matching parameter
634- // Or maybe we can issue a note about the other offending params?
635- ctor->diagnose (diag::distributed_actor_designated_ctor_must_have_one_distributedactorsystem_param,
636- ctor->getName (), transportParamsCount);
637- }
638-
639598// ==== ------------------------------------------------------------------------
640599
641600void TypeChecker::checkDistributedActor (SourceFile *SF, NominalTypeDecl *nominal) {
@@ -653,14 +612,6 @@ void TypeChecker::checkDistributedActor(SourceFile *SF, NominalTypeDecl *nominal
653612 (void )nominal->getDefaultInitializer ();
654613
655614 for (auto member : nominal->getMembers ()) {
656- // --- Check all constructors
657- if (auto ctor = dyn_cast<ConstructorDecl>(member)) {
658- if (auto classDecl = dyn_cast<ClassDecl>(nominal)) {
659- checkDistributedActorConstructor (classDecl, ctor);
660- continue ;
661- }
662- }
663-
664615 // --- Ensure all thunks
665616 if (auto func = dyn_cast<AbstractFunctionDecl>(member)) {
666617 if (!func->isDistributed ())
0 commit comments