@@ -4190,8 +4190,12 @@ ERROR(async_call_without_await_in_autoclosure,none,
4190
4190
ERROR(async_call_without_await_in_async_let,none,
4191
4191
" call is 'async' in an 'async let' initializer that is not marked "
4192
4192
" with 'await'" , ())
4193
+ ERROR(async_prop_access_without_await,none,
4194
+ " property access is 'async' but is not marked with 'await'" , ())
4195
+ ERROR(async_subscript_access_without_await,none,
4196
+ " subscript access is 'async' but is not marked with 'await'" , ())
4193
4197
WARNING(no_async_in_await,none,
4194
- " no calls to 'async' functions occur within 'await' expression" , ())
4198
+ " no 'async' operations occur within 'await' expression" , ())
4195
4199
ERROR(async_call_in_illegal_context,none,
4196
4200
" 'async' call cannot occur in "
4197
4201
" %select{<<ERROR>>|a default argument|a property wrapper initializer|a property initializer|a global variable initializer|an enum case raw value|a catch pattern|a catch guard expression|a defer body}0" ,
@@ -4201,7 +4205,7 @@ ERROR(await_in_illegal_context,none,
4201
4205
" %select{<<ERROR>>|a default argument|a property wrapper initializer|a property initializer|a global variable initializer|an enum case raw value|a catch pattern|a catch guard expression|a defer body}0" ,
4202
4206
(unsigned ))
4203
4207
ERROR(async_in_nonasync_function,none,
4204
- " %select{'async'|'await'|'async let'}0 in "
4208
+ " %select{'async'|'async' call|' await'|'async let'|'async' property access|'async' subscript access }0 in "
4205
4209
" %select{a function|an autoclosure}1 that does not support concurrency" ,
4206
4210
(unsigned , bool ))
4207
4211
NOTE(note_add_async_to_function,none,
@@ -4279,13 +4283,13 @@ ERROR(actor_with_nonactor_superclass,none,
4279
4283
" actor class cannot inherit from non-actor class %0" , (DeclName))
4280
4284
4281
4285
ERROR(actor_isolated_non_self_reference,none,
4282
- " actor-isolated %0 %1 can only be referenced "
4283
- " %select{inside the actor|on 'self'}2" ,
4284
- (DescriptiveDeclKind, DeclName, bool ))
4286
+ " actor-isolated %0 %1 can only be %select{ referenced|mutated|used 'inout'}3 "
4287
+ " %select{from inside the actor|on 'self'}2" ,
4288
+ (DescriptiveDeclKind, DeclName, bool , unsigned ))
4285
4289
ERROR(actor_isolated_self_independent_context,none,
4286
- " actor-isolated %0 %1 can not be referenced from an "
4290
+ " actor-isolated %0 %1 can not be %select{ referenced|mutated|used 'inout'}2 from an "
4287
4291
" '@actorIndependent' context" ,
4288
- (DescriptiveDeclKind, DeclName))
4292
+ (DescriptiveDeclKind, DeclName, unsigned ))
4289
4293
ERROR(actor_isolated_inout_state,none,
4290
4294
" actor-isolated %0 %1 cannot be passed 'inout' to"
4291
4295
" %select{| implicitly}2 'async' function call" ,
@@ -4298,34 +4302,34 @@ ERROR(actor_isolated_global_actor_context,none,
4298
4302
" actor %2" ,
4299
4303
(DescriptiveDeclKind, DeclName, Type))
4300
4304
ERROR(global_actor_from_instance_actor_context,none,
4301
- " %0 %1 isolated to global actor %2 can not be referenced from actor %3" ,
4302
- (DescriptiveDeclKind, DeclName, Type, DeclName))
4305
+ " %0 %1 isolated to global actor %2 can not be %select{ referenced|mutated|used 'inout'}4 from actor %3" ,
4306
+ (DescriptiveDeclKind, DeclName, Type, DeclName, unsigned ))
4303
4307
ERROR(global_actor_from_other_global_actor_context,none,
4304
- " %0 %1 isolated to global actor %2 can not be referenced from "
4305
- " different global actor %3" ,
4306
- (DescriptiveDeclKind, DeclName, Type, Type))
4308
+ " %0 %1 isolated to global actor %2 can not be %select{ referenced|mutated|used 'inout'}4 "
4309
+ " from different global actor %3" ,
4310
+ (DescriptiveDeclKind, DeclName, Type, Type, unsigned ))
4307
4311
ERROR(global_actor_from_nonactor_context,none,
4308
- " %0 %1 isolated to global actor %2 can not be referenced from "
4309
- " %select{this|an '@actorIndependent'}3 context" ,
4310
- (DescriptiveDeclKind, DeclName, Type, bool ))
4312
+ " %0 %1 isolated to global actor %2 can not be %select{ referenced|mutated|used 'inout'}4 "
4313
+ " from %select{this|an '@actorIndependent'}3 context" ,
4314
+ (DescriptiveDeclKind, DeclName, Type, bool , unsigned ))
4311
4315
ERROR(actor_isolated_partial_apply,none,
4312
4316
" actor-isolated %0 %1 can not be partially applied" ,
4313
4317
(DescriptiveDeclKind, DeclName))
4314
4318
ERROR(concurrent_access_local,none,
4315
4319
" use of local %0 %1 in concurrently-executing code" ,
4316
4320
(DescriptiveDeclKind, DeclName))
4317
4321
ERROR(actor_isolated_from_concurrent_closure,none,
4318
- " actor-isolated %0 %1 cannot be referenced from a concurrent closure" ,
4319
- (DescriptiveDeclKind, DeclName))
4322
+ " actor-isolated %0 %1 cannot be %select{ referenced|mutated|used 'inout'}2 from a concurrent closure" ,
4323
+ (DescriptiveDeclKind, DeclName, unsigned ))
4320
4324
ERROR(actor_isolated_from_concurrent_function,none,
4321
- " actor-isolated %0 %1 cannot be referenced from a concurrent function" ,
4322
- (DescriptiveDeclKind, DeclName))
4325
+ " actor-isolated %0 %1 cannot be %select{ referenced|mutated|used 'inout'}2 from a concurrent function" ,
4326
+ (DescriptiveDeclKind, DeclName, unsigned ))
4323
4327
ERROR(actor_isolated_from_async_let,none,
4324
- " actor-isolated %0 %1 cannot be referenced from 'async let' initializer" ,
4325
- (DescriptiveDeclKind, DeclName))
4328
+ " actor-isolated %0 %1 cannot be %select{ referenced|mutated|used 'inout'}2 from 'async let' initializer" ,
4329
+ (DescriptiveDeclKind, DeclName, unsigned ))
4326
4330
ERROR(actor_isolated_from_escaping_closure,none,
4327
- " actor-isolated %0 %1 cannot be referenced from an '@escaping' closure" ,
4328
- (DescriptiveDeclKind, DeclName))
4331
+ " actor-isolated %0 %1 cannot be %select{ referenced|mutated|used 'inout'}2 from an '@escaping' closure" ,
4332
+ (DescriptiveDeclKind, DeclName, unsigned ))
4329
4333
ERROR(local_function_executed_concurrently,none,
4330
4334
" concurrently-executed %0 %1 must be marked as '@concurrent'" ,
4331
4335
(DescriptiveDeclKind, DeclName))
@@ -4338,7 +4342,8 @@ NOTE(actor_isolated_sync_func,none,
4338
4342
" implicitly asynchronous" ,
4339
4343
(DescriptiveDeclKind, DeclName))
4340
4344
NOTE(actor_mutable_state,none,
4341
- " mutable state is only available within the actor instance" , ())
4345
+ " mutation of this %0 is only permitted within the actor" ,
4346
+ (DescriptiveDeclKind))
4342
4347
WARNING(shared_mutable_state_access,none,
4343
4348
" reference to %0 %1 is not concurrency-safe because it involves "
4344
4349
" shared mutable state" , (DescriptiveDeclKind, DeclName))
0 commit comments