Skip to content

Commit 01a5faf

Browse files
committed
rename default initializer's ActorSystem parameter name to actorSystem
Konrad, myself, and others feel the longer name would be better, rather than just "system"
1 parent 1f47442 commit 01a5faf

18 files changed

+23
-23
lines changed

lib/Sema/CodeSynthesis.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ static ConstructorDecl *createImplicitConstructor(NominalTypeDecl *decl,
302302
accessLevel = decl->getEffectiveAccess();
303303
auto systemTy = getDistributedActorSystemType(classDecl);
304304

305-
// Create the parameter.
306-
auto *arg = new (ctx) ParamDecl(SourceLoc(), Loc, ctx.Id_system, Loc,
305+
// Create the parameter. API name is actorSystem, local name is system
306+
auto *arg = new (ctx) ParamDecl(SourceLoc(), Loc, ctx.Id_actorSystem, Loc,
307307
ctx.Id_system, decl);
308308
arg->setSpecifier(ParamSpecifier::Default);
309309
arg->setInterfaceType(systemTy);

test/Distributed/Runtime/distributed_actor_decode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func test() {
262262

263263
// CHECK: assign type:DA, address:ActorAddress(address: "xxx")
264264
// CHECK: ready actor:DA(ActorAddress(address: "xxx"))
265-
let da = DA(system: system)
265+
let da = DA(actorSystem: system)
266266

267267
// CHECK: encode: ActorAddress(address: "xxx")
268268
let encoder = TestEncoder(system: system)

test/Distributed/Runtime/distributed_actor_func_calls_remoteCall_echo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ distributed actor Greeter {
2828
func test() async throws {
2929
let system = DefaultDistributedActorSystem()
3030

31-
let local = Greeter(system: system)
31+
let local = Greeter(actorSystem: system)
3232
let ref = try Greeter.resolve(id: local.id, using: system)
3333

3434
let reply = try await ref.echo(name: "Caplin")

test/Distributed/Runtime/distributed_actor_func_calls_remoteCall_empty.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ distributed actor Greeter {
2727
func test() async throws {
2828
let system = DefaultDistributedActorSystem()
2929

30-
let local = Greeter(system: system)
30+
let local = Greeter(actorSystem: system)
3131
let ref = try Greeter.resolve(id: local.id, using: system)
3232

3333
try await ref.empty()

test/Distributed/Runtime/distributed_actor_func_calls_remoteCall_genericFunc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ distributed actor Greeter {
3535
func test() async throws {
3636
let system = DefaultDistributedActorSystem()
3737

38-
let local = Greeter(system: system)
38+
let local = Greeter(actorSystem: system)
3939
let ref = try Greeter.resolve(id: local.id, using: system)
4040

4141
let r1 = try await ref.generic("Caplin")

test/Distributed/Runtime/distributed_actor_func_calls_remoteCall_hello.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ distributed actor Greeter {
2828
func test() async throws {
2929
let system = DefaultDistributedActorSystem()
3030

31-
let local = Greeter(system: system)
31+
let local = Greeter(actorSystem: system)
3232
let ref = try Greeter.resolve(id: local.id, using: system)
3333

3434
let response = try await ref.hello()

test/Distributed/Runtime/distributed_actor_func_calls_remoteCall_take.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ distributed actor Greeter {
2828
func test() async throws {
2929
let system = DefaultDistributedActorSystem()
3030

31-
let local = Greeter(system: system)
31+
let local = Greeter(actorSystem: system)
3232
let ref = try Greeter.resolve(id: local.id, using: system)
3333

3434
try await ref.take(name: "Caplin")

test/Distributed/Runtime/distributed_actor_func_calls_remoteCall_takeThrowReturn.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct SomeError: Error, Sendable, Codable {}
3030
func test() async throws {
3131
let system = DefaultDistributedActorSystem()
3232

33-
let local = Greeter(system: system)
33+
let local = Greeter(actorSystem: system)
3434
let ref = try Greeter.resolve(id: local.id, using: system)
3535

3636
do {

test/Distributed/Runtime/distributed_actor_func_calls_remoteCall_take_two.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ distributed actor Greeter {
4040
func test() async throws {
4141
let system = DefaultDistributedActorSystem()
4242

43-
let local = Greeter(system: system)
43+
let local = Greeter(actorSystem: system)
4444
let ref = try Greeter.resolve(id: local.id, using: system)
4545

4646
try await ref.take(name: "Caplin", int: 1337)

test/Distributed/Runtime/distributed_actor_func_calls_remoteCall_throw.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct SomeError: Error, Sendable, Codable {}
3030
func test() async throws {
3131
let system = DefaultDistributedActorSystem()
3232

33-
let local = Greeter(system: system)
33+
let local = Greeter(actorSystem: system)
3434
let ref = try Greeter.resolve(id: local.id, using: system)
3535

3636
do {

0 commit comments

Comments
 (0)