Skip to content

Commit f5ccc32

Browse files
committed
Update Distributed/actor_protocols.swift for minor diagnostic change with -enable-experimental-associated-type-inference
1 parent 85afcb1 commit f5ccc32

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/Distributed/actor_protocols.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -disable-availability-checking %S/Inputs/FakeDistributedActorSystems.swift
3-
// RUN: %target-swift-frontend -typecheck -verify -disable-availability-checking -I %t 2>&1 %s
2+
// RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -disable-availability-checking %S/Inputs/FakeDistributedActorSystems.swift -enable-experimental-associated-type-inference
3+
// RUN: %target-swift-frontend -typecheck -verify -disable-availability-checking -I %t -enable-experimental-associated-type-inference 2>&1 %s
44
// REQUIRES: concurrency
55
// REQUIRES: distributed
66

@@ -48,6 +48,8 @@ actor A2: DistributedActor {
4848
// FIXME(distributed): error reporting is a bit whacky here; needs cleanup
4949
// expected-error@-2{{actor type 'A2' cannot conform to the 'DistributedActor' protocol. Isolation rules of these actor types are not interchangeable.}}
5050
// expected-error@-3{{actor type 'A2' cannot conform to the 'DistributedActor' protocol. Isolation rules of these actor types are not interchangeable.}}
51+
// expected-error@-4{{'DistributedActor' requires the types 'ObjectIdentifier' and 'FakeActorSystem.ActorID' (aka 'ActorAddress') be equivalent}}
52+
// expected-note@-5{{requirement specified as 'Self.ID' == 'Self.ActorSystem.ActorID' [with Self = A2]}}
5153
nonisolated var id: ID {
5254
fatalError()
5355
}
@@ -67,6 +69,8 @@ actor A2: DistributedActor {
6769
final class DA2: DistributedActor {
6870
// expected-error@-1{{non-actor type 'DA2' cannot conform to the 'AnyActor' protocol}}
6971
// expected-error@-2{{non-distributed actor type 'DA2' cannot conform to the 'DistributedActor' protocol}}
72+
// expected-error@-3{{'DistributedActor' requires the types 'ObjectIdentifier' and 'FakeActorSystem.ActorID' (aka 'ActorAddress') be equivalent}}
73+
// expected-note@-4{{requirement specified as 'Self.ID' == 'Self.ActorSystem.ActorID' [with Self = DA2]}}
7074
nonisolated var id: ID {
7175
fatalError()
7276
}

0 commit comments

Comments
 (0)