mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When issuing warnings about an import not needing to be public, we did not account for the Distributed module MUST be imported when a distributed actor is declared. This also actually means that a public distributed actor effectively is a public use of the DistributedActor protocol resolves rdar://152129980
15 lines
681 B
Swift
15 lines
681 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -target %target-swift-5.7-abi-triple %S/Inputs/FakeDistributedActorSystems.swift
|
|
// RUN: %target-swift-frontend -typecheck -verify -target %target-swift-5.7-abi-triple -I %t 2>&1 %s
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: distributed
|
|
|
|
// Should NOT produce a warning, we do use the module in a public declaration, see MyPublicDistributedActor
|
|
public import Distributed
|
|
import FakeDistributedActorSystems
|
|
|
|
|
|
public distributed actor MyPublicDistributedActor {
|
|
public typealias ActorSystem = FakeActorSystem
|
|
}
|